Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Done Photo Closed Book and Notes onsplarting “ 2:00PM-finah by 2:30 PM (5 point

ID: 3599539 • Letter: D

Question

Done Photo Closed Book and Notes onsplarting “ 2:00PM-finah by 2:30 PM (5 point bonus ir finished by 2:40 PM) Gensup starting 2:55 PM must finish by 3:45 PM (S point boous if finished by 335 PM (S point bonos if the ellowing is done corectly!!) On the desktop, ereatea folder begianing with the eww prdts are o he saved to this folder. Please mote thast your programs may be lost if your work. samber of integeny namber in the upper-left cormer of this sheet follewed by yeur first initial and five letters of your last is not saved eorrectly (40) Write a program that will prompt the user for some number of integers, read in that find the sam of the digits and print out the the mamber of digits that are even. Save the source tle as progl 2 (60) Write a program that will use the following function prototypes: int readAbsoluteData(double datal): Wask user for number of points, read in points and store the absolute value of each entered value in data and returm number of points void sort(double data(], int numpes )/sort the values from lowest to highest double higSum( double datal], int nummpts), l/return the sum of all values greater than 10 In main, call readAbsoluteData to read in the number of points along with the absolute value of the data points Iin sort, the data read in by readAbsoluteData is to be sorted. In bigSum, find the sum of all values greater than 10. Each function including main is worth 15 points. Don't try to enter all the code and then debug, Instead work on main and readAbsoluteData and get that to work before going on to the other functions. Save tho source file as prog2.epp. Be sure to add your name as a comment at the beginning of each program!!

Explanation / Answer


#include <iostream>

using namespace std;
int main()
{
int count=0,Au,i,A[10],Key,Sum=0,Temp;
cout<<" Enter How Many Numbers You Have:";
cin>>Key;
cout<<" Enter "<<Key<<" Numbers:";
for(i=0;i<Key;i++)
{
cin>>A[i];
}
cout<<" The "<<Key<<" Numbers Are:";
for(i=0;i<Key;i++)
{
cout<<A[i];
cout<<" ";
}
for(i=0;i<Key;i++)
{
Au=0,count=0,Temp=0,Sum=0;
Temp=A[i];
while(Temp!=0)
{
Au=Temp%10;
if(Au%2==0)
{
count=count+1;
}
Sum=Sum*1+Au;
Temp=Temp/10;
}
cout<<" The Sum Of "<<A[i]<<" Is: "<<Sum<<" And "<<count<<" Even Numbers";
}
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote