Skip to content

Instantly share code, notes, and snippets.

@saginadir
Last active April 5, 2017 15:09
Show Gist options
  • Save saginadir/7d7e720b750acd350d24b24a966de6fd to your computer and use it in GitHub Desktop.
Save saginadir/7d7e720b750acd350d24b24a966de6fd to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main()
{
int num, c, d, e;
do {
cout << "Enter a 2 digit numbers:"<< endl;
cin >> num;
int a = num / 10;
int b = num % 10;
if (num >= 10 && num <= 100) {
c = a + b;
d = a - b;
e = a * b;
cout << "chibur:" << c << endl;
cout << "chisur:" << d << endl;
cout << "kefel:" << e << endl;
break;
}
cout << "Input must be in double digits!" << endl;
} while (num < 10 || num > 100);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment