Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int _tmain()
- {
- cout << "Input number on the first dise" << endl;
- int a;
- cin >> a;
- cout << "Input number on the second dise" << endl;
- int b;
- cin >> b;
- cout << "Input the number of the field on which you stand" << endl;
- int c;
- cin >> c;
- cout << "Input enter the number of steps that you will pass" << endl;
- if ((a + b) % 2 == 0 && c % 2 == 0){
- cout << 2 * (a + b) + c;
- }else{
- cout << a + b + c << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement