hwk_2_2019529628011 Version 0 |
|
👤 Author: by enochdongbogmailcom 2019-10-27 08:19:54 |
Using the simple machine language in Appedix C, design your own program , and store thers instructions in memory. And giving the inputs , and give out the results.
// A program in Appendix C
#include <stdio.h>
int main()
{
char str[50];
// Input the Word
printf("Enter the Word: ");
scanf("%s\n", str);
// Output the Word
printf("\nEntered Word is: %s", str);
// Input the Sentence
printf("\n\nEnter the Sentence: ");
scanf("%[^\n]\ns", str);
// Output the String
printf("\nEntered Sentence is: %s", str);
return 0;
}
Output:
Enter the Word: ILoveMusic
Entered Word is: ILoveMusic
Enter the Sentence: I Love Music
Entered Sentence is: I Love Music