Facebook
From Cobalt Owl, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 136
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int y=0,x=0, suma=0;
  8.     cout<<"Podaj liczbe x"<<endl;
  9.     cin>>x;
  10. cout<<"Podaj liczbe y"<<endl;
  11.     cin>>y;
  12.     while (y<=1000) {
  13.  
  14.         y+=x;
  15.         if (y<=1000)
  16.         {        cout << "Dla wartosci y = " << y <<endl;
  17.         }
  18.     }
  19.  
  20.     return 0;
  21. }
  22.