int main(void) double averageGrade; printf(nThe average grade is:); scanf(%lf, &averageGrade);…

int main(void) double averageGrade; printf(nThe average grade is:); scanf(%lf, &averageGrade); // out” src=”” aria-describedby=”gu4″> int main(void) // get first number printf(%s, Enter” src=”” aria-describedby=”gu5″>

I LITERALLY JUST TOOK A SNAP IF THAT DOES NOT WORK THEN IT'S YOUR GUYS END 14 14 Unit 2 Discussion: Selection and Iteration structures All programs can be written using three basic structures. Sequence, Selection, and Iteration. In this unit, we are going to focus on SELECTION (Decision- Making) and ITERATION (Looping) structures In your post, you need to cover either SELEC TION or ITERATION. You are free to include content about both In C programming languages, there are 3 types of selection (or also known as decision-making) structures. IF (single-selection), IF…ELSE (double-selection), and IF. .ELSE IE…ELSE or SWITCH (multiple-selection) In this unit, you are provided a C program using IF… ELSE IF…ELSE statement as below #include int main(void) double averageGrade; printf(“nThe average grade is:”); scanf(“%lf”, &averageGrade); // output appropriate message for average grade if (averageGrade > 3.5) { printf(“Average grade is A”); } else if (averageGrade > printf(“Average grade is B”); } else if (averageGrade > 1.5) printf(“Average grade is C”); } else if (averageGrade > printf(“Average grade is D”); } else { printf(“Average grade is F”); } 2.5) 0.5) return 0 Type the above code into Dev C++ and run it. Describe what is happening here. Now, modify this program and showcase using SWITCH-CASE statement without modifying the logic of the program. Make sure to upload your code and that it contains the original IF. ELSE IF…ELSE and the one you created using SWITCH…CASE. In C language, there are three types of iteration/looping structures in the form of statements. WHILE, DO…WHILE, and FOR Here's a program written using WHILE loop structure #include int main(void) // get first number printf(“%s”, “Enter the first number: “); int largest; /l largest number found so far scanf(“%d”, &1largest) int counter = 2; // counter for 10 repetitions // loop 9 more times while (counter


Looking for a Similar Assignment? Let us take care of your classwork while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Use Code SAVE15 for 15% discount