Question: USING VISUAL STUDIO C# Langauge create the CODE for a CONSOLE APPLICATION write a program which will ask the user to enter a number from
USING VISUAL STUDIO C# Langauge create the CODE for a "CONSOLE APPLICATION"
write a program which will ask the user to enter a number from 1-10 and save that number in a variable called num. You should open a file called "myfile.txt" which should start with the number 1 in it only. Your program will open the file, multiply the contents of the file by 2, and save the result in the same file. Your program will run this process num times.
Example:
User enters the number 3.
program opens file, file contains the number 1, it is multiplied by 2, saves the number 2 to file.
program opens file, file contains the number 2, it is multiplied by 2, saves the number 4 to file.
program opens file, file contains the number 4, it is multiplied by 2, saves the number 8 to file.
Program loop ends and it exits program *file should have the number 8 in it at this point, check to see if it is working correctly.. If I run the program again, it should continue from number 8, so if you keep running the program it should start making the number much bigger.*
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
