0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

pp2.c

Last updated at Posted at 2025-06-18

#include
#define NEG(a)-a
#define weeks(mins) (days(mins)/7)
#define days(mins) (hours(mins)/24)
#define hours(mins) (mins/60)
#define mins(secs) (secs/60)
#define TAB(c,i,oi,t) if(c == 't')
for(t=8-(i-oi-1)%8,oi = i; t; t--)
putchar(' ')
#define PR(a) printf("a = %d\t",(int)(a))
#define PRINT(a) PR(a); putchar('\n')

int main()
{
{
int x = 1;
PRINT ( -NEG(x) );
}

{
	PRINT(weeks(10080));
	PRINT(days(mins(86400)));
}

{
	static char input[]  = "\twhich\tif?";
	char c;
	int i,o1di,temp;
	
	for( o1di = -1,i=0; (c = input[i]) != '\0'; i++)
		if( c<' ') TAB(c,i,o1di,temp);
		else putchar(c);
		putchar('\n');
}

}

a = 1
a = 1
a = 1

#include
#define NEG(a)-a
#define weeks(mins) (days(mins)/7)
#define days(mins) (hours(mins)/24)
#define hours(mins) (mins/60)
#define mins(secs) (secs/60)
#define TAB(c,i,oi,t) if(c == 't')
for(t=8-(i-oi-1)%8,oi = i; t; t--)
putchar(' ')
#define PR(a) printf(#a" = %d\t",(int)(a))
#define PRINT(a) PR(a); putchar('\n')

int main()
{
{
int x = 1;
PRINT ( -NEG(x) );
}

    {
            PRINT(weeks(10080));
            PRINT(days(mins(86400)));
    }

    {
            static char input[]  = "\twhich\tif?";
            char c;
            int i,o1di,temp;

            for( o1di = -1,i=0; (c = input[i]) != '\0'; i++)
                    if( c<' ') TAB(c,i,o1di,temp);
                    else putchar(c);
                    putchar('\n');
    }

}

--x = 1
(((10080/60)/24)/7) = 1
(((86400/60)/60)/24) = 1

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?