ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Banco de ejemplos C++ (Basicos)


Enviado por   •  3 de Diciembre de 2018  •  Apuntes  •  1.198 Palabras (5 Páginas)  •  86 Visitas

Página 1 de 5

[pic 1]


Contenido

  1. Hola, Mundo!
  2. Lectura y Escritura
  3. A+B Envío de Soluciones
  4. 0 Resta básica
  5. 0 Multiplicación básica
  6. Dólares
  7. Par o impar
  8. 1 Valor Absoluto
  9. Calificaciones
  10. Decisiones if
  11. Súper sumas
  12. DFD-Reloj
  13. Comparaciones
  14. Reverso
  15. Factorial de un número
  16. Ej2.- Orden inverso
  17. Suma de vectores
  18. Sumando números


[pic 2]


#include

using namespace std;

int main()

{

    cout << "Hola mundo";

    return 0;

}


[pic 3]


#include

using namespace std;

int main()

{

    int n;

    cin>>n;

    cout<

    return 0;

}


[pic 4]

[pic 5]

[pic 6]


#include

using namespace std;

int main() {

    int a, b;

    cin >> a >> b;

    cout << a << endl;

    cout << b << endl;

    cout << a + b << endl;

    return 0;

}


[pic 7]


#include

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout <

    return 0;

}


[pic 8]


#include

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout<

    return 0;

}


[pic 9]


#include

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    cout<

    return 0;

}


[pic 10]


#include

using namespace std;

        

int main()

{

    int a;

    cin>>a;

    if (a%2==0){

        cout << "par";

    }

    else{

        cout << "impar";

    }

    return 0;

}


[pic 11]


#include

#include

using namespace std;

int main()

{

    short a,b;

    cin>>a>>b;

    if ((a+b)<0){

        cout<<-1*(a+b);

    }

    else{

        cout<<(a+b);

    }

    return 0;

}


[pic 12]


#include

        

using namespace std;

int main()

{

    int a,b,c;

    cin>>a;

    cin>>b;

    cin>>c;

    if (((a+b+c)/3)>=6)

    {

        cout<<"1";

    }

    else

    {

        cout<<"0";

    }

    return 0;

}


[pic 13]

[pic 14]

[pic 15]

[pic 16]


#include

using namespace std;

int main()

{

    int q,w,e,mayor;

    cin >> q;

    cin >> w;

    cin >> e;

    if (q>w && q>e)

    {

        mayor=q;

    }

    else

    {

        if (w>q && w>e)

        {

        mayor=w;

        }

        else

        mayor=e;

    }

    cout<< "El numero mayor es "<< mayor;

    return 0;

}


[pic 17]


#include

#include

        

using namespace std;

int main()

{

    short b,h,res=0;

    cin>>b;

    for (int i=0;i

        cin>>h;

        res+=h;

    }

    cout<

    return 0;

}


[pic 18]


#include

using namespace std;

int main()

{

    int hora,minuto,segundo;

    cin>>hora>>minuto>>segundo;

    segundo++;

    if(segundo==60){

...

Descargar como (para miembros actualizados)  txt (5.5 Kb)   pdf (1.1 Mb)   docx (424.7 Kb)  
Leer 4 páginas más »
Disponible sólo en Clubensayos.com