Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C Program that does the following:- a)input a character from the user sa

ID: 3616146 • Letter: W

Question

Write a C Program that does the following:-
a)input a character from the user say "*"
b)inputs a number N from the user
c)Prompts the user to input either 1 or 2
d)If the user enter 1, the program should print a FILLED diamondmade up of the character which has been input.The diamond shouldhave as many rows as N,which also has been input earlier.
e)If the user enter 2, the program should print a HOLLOW diamondmade up of the character which has been input.The diamond shouldhave as many rows as N,which also has been input earlier.

Explanation / Answer

please rate - thanks #include #include int main() {int i,j,k,n,m; char c; printf("How many lines? "); scanf("%d",&n); while(getchar()!= ' '); printf("enter a character? "); scanf("%c",&c); while(getchar()!= ' '); printf("Enter 1 for FILLED diamond, 2 for HOLLOW diamond: "); scanf("%d",&m); for(j=1;j
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote