Create 4 variables and assign each one to the following values:
the letters M, V, and P on the first three variables
the number 10 on the fourth variable
You may name the variable anything you want as long as it follows proper naming convention.
Using the variables you've created, print the cheer message like the one displayed in the sample output. The first line contains the cheer message for the MVP, and the second line containing a cheer message with the MVP’s jersey number, all in uppercase.
Make use of placeholders to achieve the same result as that of the sample output.
An initial code with the 2 printf()'s needed for this problem is already provided for you. Just fill in the blanks.
1
Expert's answer
2022-03-31T19:48:35-0400
#include <stdio.h>
int main()
{
char m = 'M';
char v = 'V';
char p = 'P';
int number = 10;
printf("You are welcome %c%c%c \n", m, v, p);
printf("YOU ARE WELCOME %c%c%c NUMBER %d", m, v, p, number);
return 0;
}
Comments
Leave a comment