Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab 5 task 153

Snippet info

Language

Cpp

Visibility

public

Author

niktyutenko

Created

2018-10-23T18:20:42Z

Updated

2018-11-21T10:14:57Z

#include <iostream>
using namespace std;

int main() {
    int a , b , c = 0 , x; 
    cout <<"Введите а и b(a > b)" << endl ; 
    cin >> a >> b ; 
    if (a > b){
        while (a > b){
            a -= b;
            c++;
            x = a ; 
        }
        cout << "====================================" << endl ; 
        cout << "a) Целочисленные результат = " << c << endl ; 
        cout << "====================================" << endl ; 
        cout << "б) Остаток от деления     = " << x << endl ; 
        cout << "====================================" << endl ; 
    }
    else {
        cout << "Вы ввли неверные данные" << endl ; 
    }
    
    return 0;
}
INFO