Computer Science, asked by Soumallaya, 4 months ago

write a program in c++ to input number and find the largest number? ​

Answers

Answered by shettyanitha2005
4

Explanation:

include <iostream>

using namespace std;

int main() {

float n1, n2, n3;

cout << "Enter three numbers: ";

cin >> n1 >> n2 >> n3;

if(n1 >= n2 && n1 >= n3)

cout << "Largest number: " << n1;

if(n2 >= n1 && n2 >= n3)

cout << "Largest number: " << n2;

if(n3 >= n1 && n3 >= n2)

cout << "Largest number: " << n3;

return 0;

}

Similar questions