Question #306059

Input three random characters and make sure they are inputted on different lines.

Print out the three characters in order, each on a different line, using only 1 printf() statement and newline characters (\n).

An initial code with the one printf() is provided for you, just complete the missing items inside it. Do not add any other printf()'s


Expert's answer





#include <stdio.h>
#include <stdlib.h>


int main(){
	char character1,character2,character3;
	scanf("%c",&character1);
	scanf("%c",&character2);
	scanf("%c",&character2);
	scanf("%c",&character3);
	scanf("%c",&character3);




	printf("%c\n%c\n%c\n",character1,character2,character3);
	getchar();
	getchar();
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS