See below I posted the instructions and my attempt at a solution. Please give me suggestions for the code i did
Thanks
Assignment purpose: To compile, build, and execute an interactive program using characters, integers, doubles, simple calculations in C, and file input. One source code file (unformatted text) will be submitted The file name must match the assignment The code should be tested and run on a Microsoft compiler before it is uploaded onto Canvas The code must be submitted on time in order to receive credit (11:59 PM on the due date) Late submissions will not be accepted or graded All programming assignments are individual work, sharing code is considered cheating ASCII (American Standard Code for Information Interchange) You will need to use functions from: #include
//toupper and tolower Instructions: Be sure to save the input.txt file into the same directory as the source code file (remember to use your Z drive on portal.eng.fau.edu) Create an interactive program that will . Greet the user 2. Get a letter from an input file (input.txt) and print it onto the screen 3. Find the numerical ASCII value and print it on the screen // EXAMPLE //char letter x //int number (int ) letter; 4. Change the letter to lowercase 5. Find the numerical ASCII value and print it on the screen 6. Change the letter to upper case 7. Find the numerical ASCII value and print it on the screen 8. Get an integer from an input file (input.txt) and print it onto the screen 9. Ask and get an integer from the user 10. Calculate the sum of the integer from the file and the integer from the user 11. Print the result onto the screen 12. Ask and get a double from the user 13. Calculate the product of the double that was entered by the user multiplied by sum from number 10. 14. Print the result onto the screen define CRT SECURE NO WARNINGS Sneludecstdio.h //printf and seanf 5neludecctype.h> I/toupper and tolover includecstdlib.h>//abs int main0 I/Ideclae a file pointer FILE +nPtr://declare 3 eharaeter variables char letter, letterl, letter2 double inputi, resultl int fileinput, userinput,sun nPtr topen ("input.txt".") prinf "lello!")a print("The letter from the tile is tcin". letter)a umlint)letter: //declare 2 doubles //declare 3 integers one fron file and one from uer oe for the sun //connect to the file using fopen //Greet the user //Get a letter from an input file (input.txt) and print it onto the screen //Find the numerical ASCII value and print it on the screen print "The number for the letter fron the file is din numi)a //Change the letter to lowercase letter-tolower (letterl) printf("The letter from the file lowercase is tela", letcerl) um2 nt)letterl //Find the nunerical ASCiE value and print it on the sereen print ("The number for the letter fron the file lowercase is idin" nun2) //Change the letter to upper case etter-toupper (letter2) printf("The letter from the tile uppezcase ia tcln", letter2) //Find the numerical ASCIt valueand print it on the sereen num3-(int)letter2 print l"The number for the letter fron the file uppercase is idl" nun3) //Get an integer fron an input tsle (input.txt) and print it onto the print ("The nunber from the Eile is din" sleinput) //Ask and get an integer from the user printf("InEnter an integer: scanf "ld". userinput) //Calculate the sum of the integer from the file and the integer from the sum-fileinput+userinput //Print the result onto the creen printf("Sum of two integers din",sum) //Ask and get a double from the user printf("inEnter a double: " scanf("if".input1) /Caleulate the product of the double that was entered by the user maltiplied by sun from number 10 //Pzint the result onto the screen //elose the file pointer using telose resultl-input1 (double)sum printf("product-1n".resultl a Eclose (inPtr. "input.txt eturn