#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int a;
int b;
cout << "Введите целое число: ";
cin >> a;
cout << "Введите второе целое число: ";
cin >> b;
cout << "Остаток: " << a % b << endl;
if ((a % b) == 0)
cout << a << " Делится на " << b << endl;
else
cout << a << " Не делится на " << b << endl;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter