Showing posts with label l. Show all posts
Showing posts with label l. Show all posts

Find the Largest Number in C++

This program finds the largest of three numbers.

#include <iostream>

int main() {

    int num1, num2, num3;

    std::cout << "Enter three numbers: ";

    std::cin >> num1 >> num2 >> num3;

    int largest = num1;

    if (num2 > largest) {

        largest = num2;

    }

    if (num3 > largest) {

        largest = num3;

    }

    std::cout << "The largest number is " << largest << std::endl;

    return 0;

}


Lists in Python

Introduction: In the realm of Python, lists stand as one of the most versatile and widely used data structures. A list is an ordered, muta...

Post Count

Loading...