Advertisement
Charnaxuss

cpp mole

Apr 14th, 2021
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     int n, M, wzor;
  6.     std::cout << "Program...\n";
  7.     std::cout << "Oblicz...\n";
  8.    
  9.     std::cout << "Podaj N... ";
  10.     std::cin >> n;
  11.     while(n != 3)
  12.     {  
  13.         std::cout << "Podales zly N...\n";
  14.         std::cout << "Podaj N... ";
  15.         std::cin >> n;
  16.     }
  17.     std::cout << "Podaj M... ";
  18.     std::cin >> M;
  19.     while(M != 98)
  20.     {  
  21.         std::cout << "Podales zly M...\n";
  22.         std::cout << "Podaj M... ";
  23.         std::cin >> M;
  24.     }
  25.    
  26.     wzor = M * n;
  27.     std::cout << "Masa.. " << wzor;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement