Program in C. Create a program that asks the user for information about a country. It should ask the user for the country’s name, the country’s most famous sport, the country’s most popular food and the country’s capital. When done reading information from the user, it should print out all the information received. You have to use strings. Each string should be 70 characters long. Your input should accept white spaces and your output should print white spaces. When scanning, make sure you use one of the methods seen in class (whichever method you prefer). Same for printing, from the methods we saw in class, use whichever method you prefer to print strings. Notes: No need of functions (everything can be done in main if you want to) and no need of structures (you can use separate strings if you want to). Also, your program does not have to check whether or not the user inputted more than 70 characters.
Create a program that asks the user for information about a country. It should ask the user for the country’s name, the country’s most famous sport, the country’s most popular food and the country’s capital. When done reading information from the user, it should print out all the information received. You have to use strings. Each string should be 70 characters long. Your input should accept white spaces and your output should print white spaces. When scanning, make sure you use one of the methods seen in class (whichever method you prefer). Same for printing, from the methods we saw in class, use whichever method you prefer to print strings.
Notes: No need of functions (everything can be done in main if you want to) and no need of structures (you can use separate strings if you want to). Also, your program does not have to check whether or not the user inputted more than 70 characters.
Program:
Screenshot of the program:
Step by step
Solved in 3 steps with 3 images