Exam 3 program 2& Exam 4 program 1 hw

User Generated

ghexrvgz

Computer Science

Computer science c program

Irvine Valley College

Description

hi I have a homework that’s need modifying from exam 3 program 2 to exam 4 program 1 hw. The hw needs to be done on visual studio community and modified from exam 2 hw which I will attach

Unformatted Attachment Preview

{ I grade = 'F'; f++; printf("\n%s\nTotal Homework Points : %d \nTotal Exam Points : %d\nClass Percentage : %0.2f \nGrade : %s\n\n", //string - collection of chars name, totalhomework, totalexam, percentage, grade); // ||||| %d = int/unsigned int ||||| %c char getchar();//????? 8 59 70 71 72 | 73 74 75 76 77 printf("\naverage exam 1 score : %0.2f", exam1total / (float)5); 1/5 average scores a,b,c,d,f? or 5 other "things" printf("\naverage exam 2 score : %0.2f\n", exam2total / (float)5); printf("\nNumber of A's : %d\nNumber of B's : %d\nNumber of C's : %d\nNumber of D's : %d\Number of F's : %d\n", a, b, c, d, f); system("PAUSE"); Error List 80 % Entire Solution O Errors 3 Warnings Messages Build + IntelliSense Output Ready Ln 66 Col 9 INS printf("\n's InTotal Homework Points : X \nTotal Exam Points : %d\nClass Percentage: %0.2f \nGrade : %\n\n", l/string - collection of cha name, totalhomework, totalexan, percentage, grade); // \\\\\ %d int/unsigned int 11111 %c char getchar();/????? printf("\naverage exam 1 score : %0.2f", exam total / (float)5); //5 average scores a,b,c,d, f? or 5 other "things" printf("\naverage exam 2 score : %0.2f\n", exan2total / (float)5); printf("\nNumber of A's : %d\nNumber of B's : %d\nNumber of C's : %d\nNumber of D's : %d\Number of F's : %d\n", a, b, c, d, f); system("PAUSE”); Error List 30 % Entire Solution 0 0 Errors A 3 Warnings 0 Messages Dutput Build + IntelliSense O Ready In 66 Col 9 Ch 9 A INS (Global Scope) maino Voup EXAM 2 PROGRAM 1 36 37 else if (percentage = 80) 38 { 39 grade = 'B'; 40 b++; 41 42 43 else if (percentage >= 70) 44 { 45 46 grade = 'C'; 47 C++; 48 49 } 50 51 else if (percentage >= 60) 52 { 53 54 grade = 'D'; 55 d++; 56 57 58 59 else 60 { 61 grade = 'F'; f++; 64 I 62 63 65 66 67 68 69 70 printf("\n%s\nTotal Homework Points : %d \nTotal Exam Points : %d\nClass Percentage : %0.2f \nGrade : %c\n\n", //string - collection of chars. name, totalhomework, totalexam, percentage, grade); // Il %d = int/unsigned int 111 % char Error List הר 80 % Entire Solution O Errors A3 Warnings O Messages Build + IntelliSense 7 Output Evoid main() 4 5 6 7 char name[15]; char grade; int homeworki, homework2, homework3, examı, examítotal, exam2, exam2total, totalhomework, totalexam, a, b, c, d, f; float percentage; exam1total = 0; exam2total = 0; a = b = c = d = f = : 0; for (int i 0; i < 5; i++) 11 12 13 14 15 16 17 1 18 printf("enter a name "); gets_s(name); //no placeholder printf("enter homework grades and exam scores "); scanf("%d%d%d%d%d", &homework1, Shomework2, &homework3, &exam1, &exam2); I exam.total += exam1; //examtotal = examitotal + exam1; exam2total += exam2; totalhomework = homeworkl + homework2 + homework3; totalexam = exam1 + exam2; percentage = totalhomework I (float) 1.875 + totalexam / (float) 3.333; 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 80 % if (percentage < o Il percentage >100) printf("\invalid"); else if (percentage >= 90) { grade = 'A'; a++; Error List Entire Solution O Errors 3 Warnings O Messages X Build + IntelliSense Output Ready Ln 66 Col 9 Ch 9 INS o A w 80 to under 90 70 to under 80 60 to under 70 Under 60 COOL Lastly , calculate and print how many of each letter grade was given for the students. That is, how many A's, how many B's, how many C's, how many D's, and how many F's. Exam 2 Program 2: Write a C program that plays the game of Chuck-A-Luck with the user. Five dice are rolled. The user bets on a specific number from 1 to 6. Count the number of the five dice that match the user's number. If there is at least one matching number, the user wins the number of matching numbers bet amount. If none of the 5 dice match the user's number, the user loses their bet. For example, if the user bets on 4 and the dice come up 2 4 2 45, the user wins two times the bet amount. * Exam 3 Program 1: Write a C program which includes the following functions with parameter passing: Function 1: Allow the user to enter 4 integer values. Function 2: Print the 4 integer values. Function 3: Use the return statement to return the largest of the 4 integer values. Print the largest value in the main. Function 4: Sort the 4 integer values from low to high. Upon returning to the main, use your print function to print the 4 integer values in sorted order. Please include comments in this function explaining the technique you used to perform the sort. Exam 3 Program 2: Rewrite Exam 2 Program 1 using appropriate functions and parameter passing. You can include either void or non-void functions. Also, please include a structure chart for your program which you can either create by hand or on the computer. Your main should consist of only declarations and function calls. Exam 4 Program 1: Rewrite Exam 3 Program 2 using a looping statement. You may use either a while loop, do loop, or for loop. Please include a brief statement in a comment statement in your program stating the assumptions you made to pick your looping statement. That is, if the loop is deterministic or indeterministic and if the loop is entrance-controlled or exit-controlled. Exam 4 Program 2: Write a C program that picks a random number from 1 to 100. Allow the user to guess the random number by printing if each guess is higher or lower than the random number. If the user cannot guess the random number in 7 guesses, print out the random number picked. If the user guesses the number in 7 or fewer guesses, print how many guesses it took the user to guess the random number. Final Exam Program 1: Write a C program which uses the following functions for an array of 5 names: a. Load the array from the keyboard b. Print the array c. Sort the array in ascending order d. Print the array again using the same print function from b e. Allow the user to enter a full name and search for the full name in the array. Print "found” if the full name is in the array or print "not found" if the full name is not in the array.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hey I am through with the work. I got...


Anonymous
Just the thing I needed, saved me a lot of time.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Content

Related Tags