View Code of Problem 25

#include <stdio.h>
int main()
{
	int t,kz[100],c;
	char a;
	scanf("%d",&t);getchar(\n);
	c=t;
	while (scanf("%c\n",&a)!=EOF)
	{   
	   	   kz[t]=a+32;
		   t--;
		   if (t==0) break;
    }
	while (c!=0)
	{   
	   printf("%c\n",kz[c]);
	   c--;
	   if (c==0) break;
	}
	return 0;
}
/*
Main.c: In function 'main':
Main.c:6:2: error: stray '\' in program
  scanf("%d",&t);getchar(\n);
  ^
Main.c:6:26: error: 'n' undeclared (first use in this function)
  scanf("%d",&t);getchar(\n);
                          ^
Main.c:6:26: note: each undeclared identifier is reported only once for each function it appears in
Main.c:6:17: error: too many arguments to function 'getchar'
  scanf("%d",&t);getchar(\n);
                 ^
In file included from Main.c:1:0:
/usr/include/stdio.h:538:12: note: declared here
 extern int getchar (void);
            ^
*/

Double click to view unformatted code.


Back to problem 25