I need help writing this program; Create two int variables: myint /* stores an i
ID: 3623240 • Letter: I
Question
I need help writing this program;Create two int variables:
myint /* stores an integer */
mychar /* stores a single character value */
Prompt the user for an integer value (use a printf statement)
Input an int value and store it in myint (use a scanf statement)
Prompt the user for a single character (A – Z)
Input a char value and store it in mychar
Output the value of myint in a line of text that tells the user this is the integer you input
Output the value of mychar in a line of text that tells the user this is the character you input
Always end your last output (printf) with a NL character ‘ ’ to force any following text to the next line on the screen.
Use a return statement to end your program.
Explanation / Answer
PLZ Rate... Note: this program is running correctly on borland compiler. Here is the code... #include #include void main() { int myint; char mychar; printf(" Enter an Integer Value :"); scanf("%d",&myint); printf(" Enter a Character (A-Z):"); mychar=getche(); getche(); printf(" The integer you input is :%d",myint); printf(" The character you input is :%c",mychar); getche(); } Best of Luck....Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.