CS110 Assignment 2 (Theory) Total mark 8 Instructions: 1. Write your name and ID on top of your solution. 2. Use Word or

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

CS110 Assignment 2 (Theory) Total mark 8 Instructions: 1. Write your name and ID on top of your solution. 2. Use Word or

Post by answerhappygod »

Cs110 Assignment 2 Theory Total Mark 8 Instructions 1 Write Your Name And Id On Top Of Your Solution 2 Use Word Or 1
Cs110 Assignment 2 Theory Total Mark 8 Instructions 1 Write Your Name And Id On Top Of Your Solution 2 Use Word Or 1 (67.91 KiB) Viewed 15 times
CS110 Assignment 2 (Theory) Total mark 8 Instructions: 1. Write your name and ID on top of your solution. 2. Use Word or any other application to save your solution as a PDF. Submit your file as a PDF. 3. Do not copy the solution from a friend or the internet. If you copy, you will get a zero mark on this assignment. 4. Submit your solution before the duedate (18.10.1443). Assignment question: Choose and explain in your own words the idea of only one program of the following, then produce a flowchart. Use correct symbols (this is a suggested website to draw flowcharts: https://app.diagrams.net/).

#include <iostream> using namespace std; int main() { } const int NUMGRADES =4; const int NUMSTUDENTS =20; int i, j; double grade, total, average; for (i = 1; i <= NUMSTUDENTS; i++) { total = 0; for (j=1; j <= NUMGRADES; j++) cout << "Enter a grade for this student"; cin >> grade; total= total + grade; } average = total/NUMGRADES; " << i cout <<"\n The average for student << " is " << average << "\n\n"; } return 0;

#include <iostream> #include <iomanip> using namespace std; int findMax (int, int); int main() { int firstnum, secnum, max; cout << "\nEnter a number: "; cin >> firstnum; cout << "Enter a second number: "; cin >>secnum; max = findMax (firstnum, secnum); cout << "\nThe maximum of the two numbers is " << max << endl; return 0; } int findMax (int x, int y) { int maximum; if (x >= y) maximum = x; else maximum =y; return maximum;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply