Menu

[solved] – Question 88953

#include <iostream>
using namespace std;

void main()
{
int no1, no2, no3;

cout << “Enter the first value : “
cin >> no1;
cout << “Enter the second value : “
cin >> no2;

if (no1 < no2)
min = no1;
if (no2 <= no1)
min = no2;

cout << “The lowest value is “ << min << endl;
}

(a)What is the output if the value for no1 is 5 and no2 is 6? Provide the tracing table.
(5 marks)

(b)Edit the program to output the highest value.

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *