
Andy C. answered 10/14/18
Math/Physics Tutor
using namespace std;
#include <iostream>
#include <math.h>
#include <string.h>
int main()
{
cout << 4 + 24 / 3 * 4 << endl; // 36
cout << ( 5 < 10 && 0 + 1) << endl; // true
int age=45;
char str[25];
strcpy(str, (age>=65)?"senior":"adult");
cout << str << endl; // adult
cout << strcmp("NDM" ,"ndm") << endl; // true : strcmp returns negative
cout << (20 % 6 == 0 ) << endl; // false
cout << pow(2, 5) - pow(5, 2) << endl; // 7
cout << ( (3 < 4) || (4 < 5) && (10 == 9) ) << endl; // true
int n=0;
cout << ( n-- + 2 ) << endl; // 2 because the POST incrementor returns zero
cout << ( (double) (3) / 6 * 2 ) << endl; // 1.0
cout << 3 / 6 * 2 << endl; // 0 because of integer division 3/6 is zero
}