Skip to content

Instantly share code, notes, and snippets.

@jesuscmadrigal
Created September 1, 2017 17:12
Show Gist options
  • Save jesuscmadrigal/619ee71b7acaa5ea33c90439cc839b2e to your computer and use it in GitHub Desktop.
Save jesuscmadrigal/619ee71b7acaa5ea33c90439cc839b2e to your computer and use it in GitHub Desktop.
Numbers
#include <iostream>
int main()
{int x,y,suma,resta,product,division,residuo;
std::cout<<"\n ingrese numero x:";
std::cin>>x;
std::cout<<"\n ingrese numero y:";
std::cin>>y;
suma=x+y;
resta=x-y;
product=x*y;
division=x/y;
residuo=x%y;
std::cout<<"\nLa suma de "<<x<<"+"<<y<<" es="<<suma;
std::cout<<"\nLa resta de "<<x<<"-"<<y<<" es="<<resta;
std::cout<<"\nLa multiplicacion de "<<x<<"*"<<y<<" es="<<product;
std::cout<<"\nLa division de "<<x<<"/"<<y<<" es="<<division;
std::cout<<"\nEl residuo de "<<x<<"%"<<y<<" es="<<residuo;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment