#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int x;
cout << "Введите ваше число ";
cin >> x;
if(x < 0)
{
x = -x;
}
cout << " Модуль числа равен: " << x;
}
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