Fandom

Scratchpad

PLE:Unidad22Ejercicio08

219,559pages on
this wiki
Add New Page
Discuss this page0 Share
/*
Programa:       Ejercicio8.cpp
Fecha:          11/10/2008
Descripción:    Muestra el mayor de dos números
*/
#include <iostream>
using namespace std;
void main()
{
        int a, b;
        cout << endl << "Introduzca un numero ";
        cin >> a;
        cout << endl << "Introduzca otro numero ";
        cin >> b;
        if(a > b)
                cout << endl << "El mayor es el " << a;
        else if(a == b)
                cout << endl << "Los numeros son iguales";
        else
                cout << endl << "El mayor es el " << b;

        cin.ignore();
        cin.get();
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random wikia