Alt 2. (10 pts) W named deanslistthat accepts the below arrays as parameters and
ID: 3715678 • Letter: A
Question
Alt 2. (10 pts) W named deanslistthat accepts the below arrays as parameters and prints the names of those with GPA 's at and alhove 3,50 in a single alert with each name/ spa pair on a new line //the following arrays are to be treated as "parallel armays" for this progr var arrayStudents ["Marilyn Monroe", "Abraham neinutherx Einstein, "Mother Teresa "John F. Kennedy", Lincoln", "Albert r." "Nelson r:Nelson Mandela, "inston Churchi1l". 8111 Gates". Ali, "Mahatma Ghandi]i var arrayGPA [3.5s, 2.36, 1.87, 3.99, 3.23, 4., 3.6. -[3.55, 2.36, 1.87, 3.99, 3.23, 4.e var arrayGPA 3.49, 2.51];Explanation / Answer
//function defination
void deanslist(char arstudents[],float argpa[],int n)
{
//here n is total no of student
for(int i=0;i<n;i++)
{
if(argpa[i]>=3.50)
cout<<arstudents[i]<<" "<<argpa[i]<<" ";
}
}
//function call
deanlist(arrayStudents,arrayGPA,11);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.