1. Three Char Apart
by CodeChum Admin
Do you like reading books? If you do, then you must have encountered texts that have quite a wide space with dots in between them, just like pausing or thinking before proceeding the narration. Let’s try doing that here in C, shall we?
Input
1. First character
2. Second character
Output
The first line will contain a message prompt to input the first character.
The second line will contain a message prompt to input the second character.
The succeeding lines contain the 2 characters separated by dots.
#include <stdio.h>
#include <stdlib.h>
int main(){
char character1,character2;
scanf("%c",&character1);
scanf("%c",&character2);
scanf("%c",&character2);
printf("%c.%c\n",character1,character2);
getchar();
getchar();
return 0;
}
Comments
Leave a comment