Mr. Jojer has written an article, but now he wants to make a copy of it and check out how many characters he has used.
Input and Output
You will be given an article, you should output this article again and how many characters are there.
Sample Input
FerrAriS and Jojer are friends.
Sample Output
FerrAriS and Jojer are friends.
32
Note: All the characters must be counted, even they can’t be displayed. And do not output extra characters.
code:
#include<stdio.h>
int main()
{
char ch;
int num=0;
while(ch=getchar(),ch!=EOF)
{
printf("%c",ch);
num++;
}
printf("%d",num);
return 0;
}
Input and Output
You will be given an article, you should output this article again and how many characters are there.
Sample Input
FerrAriS and Jojer are friends.
Sample Output
FerrAriS and Jojer are friends.
32
Note: All the characters must be counted, even they can’t be displayed. And do not output extra characters.
code:
#include<stdio.h>
int main()
{
char ch;
int num=0;
while(ch=getchar(),ch!=EOF)
{
printf("%c",ch);
num++;
}
printf("%d",num);
return 0;
}