#include <cstdlib>#include <iostream>
int main()
{
int a = 0, b = 0;
cout<<"Enter first number"<<endl;
cin>>a;
cout<<"Enter second number"<<endl;
cin>>b;
int raznost = a - b;
int modul = raznost;
if(modul<0)
modul = -modul;
cout<<"modul = ";
cout<<modul;
return 0;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <cstdlib>
#include <iostream>
int main()
{
int a = 0, b = 0;
cout<<"Enter first number"<<endl;
cin>>a;
cout<<"Enter second number"<<endl;
cin>>b;
int raznost = a - b;
int modul = raznost;
if(modul<0)
modul = -modul;
cout<<"modul = ";
cout<<modul;
return 0;
}