Quick actions

cmd+k|ctrl+k

Navigation

Languages

Лаба 3

Snippet info

Language

Cpp

Visibility

public

Author

grekich505

Created

2019-09-14T15:02:56Z

Updated

2019-10-06T13:15:20Z

#include <iostream>
using namespace std;

void task15() {
    
    cout <<"Задание 15\n";
      
    int x, y, result;
    
    cin >> x;
    cin >> y;
    result = x - y;
    cout << x << "-" << y << "=" << result << endl;
    
    if (result >= 100) {
        cout << "Ошибка (<=100)";

    }
     if (result <= 100) {
        cout << "Верно";
  
     }
     cout << "\n\n";
}

void task17() {
    
    cout <<"Задание 17\n";
      
    int x;
    
    cin >> x;
    cout << x << endl;
    if (x / 3) {
        cout << "Результат делится на 3";
    }    
    if (x % 3) {
        cout << "Результат не делится на 3";
    }
    
     cout << "\n\n";
}

    int main()
    {
    task15();
    task17();
}

INFO