Asked by criss
what will be the c++ source code of finding the largest value among the N numbers? translate the algorithm:
1. the largest number is:
2. the smallest number is:
3. display all the numbers inputted:
4. show the final output.
1. the largest number is:
2. the smallest number is:
3. display all the numbers inputted:
4. show the final output.
Answers
Answered by
umair
int a,b;
cout<<"enter the value of a:";
cin>>a;
cout<<"enter the value of b:";
cin>>b;
if(a>b)
cout<<"largest value is:"<<a<<endl;
else
cout<<"smallest value:"<<b<<endl;
cout<<"enter the value of a:";
cin>>a;
cout<<"enter the value of b:";
cin>>b;
if(a>b)
cout<<"largest value is:"<<a<<endl;
else
cout<<"smallest value:"<<b<<endl;
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.