Not Monitored
Tag not monitored by Microsoft.
38,640 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
#include <iostream.h>
int main ()
{
int a=5, b=3;
cout<<”a + b = “<<a+b;
cout<”\na – b =”<<a-b;
cout<<”\na * b =”<<a*b;
cout<<”\na / b =”<<a/b;
cout<<”\na % b =“<<a%b;
return 0;
Just compile it and you will see the errors like headers and < instead of << :
#include <iostream>
using namespace std;
int main()
{
int a = 5, b = 3;
cout << "a + b = " << a + b;
cout << "\na - b = " << a - b;
cout << "\na * b = " << a * b;
cout << "\na / b = " << a / b;
cout << "\na % b = " << a % b;
return 0;
}
=>
a + b = 8
a - b = 2
a * b = 15
a / b = 1
a % b = 2