Answer to Question #306059 in C for nicole

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


1
Expert's answer
2022-03-04T08:34:06-0500




#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS