Answers for "largest number in c++"

C++
0

largest number in c++

#include <iostream>
using namespace std;
int main()
{
	int num, max = 0;
	cout << "Enter 3 numbers: ";
	for(int i = 0; i < 3; i++)
	{
		cin >> num;
		if (num > max)
			max = num;
	}
	cout << max << " is the largest number.";
	return 0;
}
Posted by: Guest on August-23-2021

Code answers related to "largest number in c++"

Browse Popular Code Answers by Language