Advertisement
Guest User

summ actually

a guest
Oct 13th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.47 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4.     int num1, num2, ns,result;
  5.     char operation,sub;
  6.     cin >> num1,num2,ns,operation;
  7.     int n s, subresult;
  8. switch (operation) {
  9.     case ns=10:
  10.         switch (sub) {
  11.             case operation  = "+":
  12.                 result = num1 + num2;
  13.                 break;
  14.             case operation = "-":
  15.                     result = num1 - num2;
  16.                     break;
  17.             case operation = "*":
  18.                 result = num1 * num2;
  19.                 break;
  20.             case operation = "/" :
  21.                     result = num1 / num2;
  22.                     break;
  23.             default: cout << "Wrong Input"
  24. }
  25.     case ns=8:
  26.         switch (sub){
  27.             case operation  = "+":
  28.                 subresult = num1 + num2;
  29.                 while (n>0)
  30.  
  31.  
  32.                 break;
  33.             case operation = "-":
  34.                 result = num1 - num2;
  35.                 break;
  36.             case operation = "*":
  37.                 result = num1 * num2;
  38.                 break;
  39.             case operation = "/" :
  40.                 result = num1 / num2;
  41.                 break;
  42.             default: cout << "Wrong Input"
  43.         }
  44.     default: cout << "Wrong Input"
  45. }
  46.     \\ операции для двоичной
  47.     \\ четв
  48.     \\ восьмеричной
  49.     \\ десятичной
  50.     \\ смерть ибо я не знаю как это сделать
  51.  
  52.  
  53.     cout << result;
  54.     return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement