I need to convert the following into C++. The general idea is to create an application...

60.1K

Verified Solution

Question

Programming

I need to convert the following into C++. The general idea is tocreate an application that can support 10 ID's and 10 grades. Itneeds to calculate the grade average of said ID, and determine ifit is an below or above a certain average, ergo A or C.

string[10] studentIDArray
int[10] gradeArray
int averageGrade

for(int i = 0; i < gradeArray; i++)
{
averageGrade += gradeArray[i]
}

averageGrade = averageGrade / sizeof(gradeArray)
for(int i = 0; i < studentIDArray; i++){
if(gradeArray[i] > averageGrade)
{
Output: studentIDArray[i] gradeArray[i] grade is A
}
else
{
Output: studentIDArray[i] gradeArray[i] grade is C
}

}

Answer & Explanation Solved by verified expert
3.6 Ratings (615 Votes)
include using namespace stdint main assign with default to    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students