SHARE
TWEET

Untitled

a guest Mar 18th, 2011 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <conio.h>
  3. int main()
  4. {
  5.         int val=0;
  6.         while(val!=-1)
  7.         {
  8.         int i=1, van=0, ox=0, M=0, Mt=0;
  9.         std::cin >> val >> van >> ox;
  10.         while (i<=val){
  11.         Mt=(39*i)/0.12;
  12.                 M=39*i+(val-i)+51*van+16*ox;
  13.         if (M==Mt){
  14.                 std::cout << "Ono, kalia"<< i<<"\n";
  15.         } else
  16.                         std::cout << "ne podhodit!\n";
  17.                 i++;
  18.         }}
  19.         getch();       
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top