May I know what is the output, Thanks

AbigailJ 101 Reputation points
2022-01-30T01:33:13.373+00:00
#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;
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,182 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 81,746 Reputation points
    2022-01-31T09:13:57.207+00:00

    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
    
    1 person found this answer helpful.
    0 comments No comments