Answer to Question #299005 in C for PLEASE

Question #299005

Enter·the·first·character:·C

Enter·the·second·character:·c

Enter·the·third·character:·C

Not·Equal


1
Expert's answer
2022-02-17T10:17:02-0500
#include <stdio.h>


int main(void) {
	
	char character1,character2,character3;
	printf("Enter the first character: ");
	character1 = getchar();
	printf("Enter the second character: ");
	character2 = getchar();
	character2 = getchar();
	printf("Enter the third character: ");
	character3 = getchar();
	character3 = getchar();
    if(character1==character2 && character1==character3)
    {
        printf("Equal\n");
	}else{
		printf("Not Equal\n");
	}






	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