Source Code:
1 2 3 4 5 6 7 8 9 10 11 12 | #include <iostream.h> #include <conio.h> int main() { int a = 10; int b = 20; int c = 30; cout << "a * b + c is: " << a * b + c << endl; cout << "a * (b + c) is: " << a * (b + c) << endl; getch(); return 0; } // main |
Output:
a * b + c is: 230 a * (b + c) is: 500
No comments:
Post a Comment