Sunday, February 17, 2013

Operators in C++

#include <iostream>
using namespace std;
int main()
{
    int x,y;
    x=4;
    y=2;
    cout<<x+y<<endl;
    cout<<x-y<<endl;
    cout<<x*y<<endl;
    cout<<x/y<<endl;
    cout<<x%y<<endl;
    return 0;
}

No comments:

Post a Comment