Created
January 17, 2017 00:37
-
-
Save Adals20/58b2c81e73c5905f7fc54fb20cdd291d to your computer and use it in GitHub Desktop.
Operaciones básicas con 2 números C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main (){ | |
cout << "Escriba el primer numero" << endl; | |
int x1; | |
cin >> x1; | |
cout << "Esbriba el segundo numero" << endl; | |
int x2; | |
cin >> x2; | |
cout << "Dados dos numeros se calcula: " << endl; | |
int x3 = x1 + x2; | |
cout <<"La suma de los numeros es: " << x3 << endl; | |
int x4 = x1 - x2; | |
cout <<"La diferencia entre los dos numeros: " << x4 << endl; | |
int x5 = x1 * x2; | |
cout <<"El producto de los dos numeros: " << x5 << endl; | |
int x6 = (x1 / x2); | |
cout <<"La division exacta: " << x6 << endl; | |
int x7 = x1 % x2; | |
cout <<"El residuo de la division: " << x7 << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment