Playing With Characters | HackerRank
Problem Link : Playing With Characters
Solution :
Develop by Samsus Salehin Sabbir
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
- #include <stdlib.h>
- int main()
- {
- // declaration
- char ch;
- char s[100];
- char sen[100];
- scanf("%c",&ch); // for one character read
- scanf("\n"); // for 2nd time newline
- scanf("%[^\n]%*c", s);
- scanf("\n");
- scanf("%[^\n]%*c", sen);
- printf("%c\n",ch);
- printf("%s\n",s);
- printf("%s\n",sen);
- return 0;
- }
No comments