Advertisement
Mastercpp

restar sin usar -

Feb 1st, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main(){
  6.     int a,b,res;
  7.  
  8.     cout << "ingrese primer numero: ";
  9.     cin>>a;
  10.     cout << "ingrese el segundo numero: ";
  11.     cin>>b;
  12.  
  13.     for(res=0; b<a; res++)b++;
  14.     cout << a << " - "<< b << " = " << res;
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement