The Big Master

Remainder Operator

#include <iostream> using namespace std; int main() { Cout << 6 %...
#include <iostream>
using namespace std;
int main()
{
Cout       << 6 % 8  << endl;             // 6
     << 7 % 8  << endl ;            // 7
     << 8 % 8  << endl ;           // 0
     << 9 % 8  << endl ;          // 1
     << 10 % 8 << endl;         // 2
return 0;
}
#include <iostream>
using namespace std;
int main()
{ 
    // expression a combination of operators and operands r is operand and * is the operator 
    // program to find the area of a circle 
    float	pi = 3.1415 , r= 5 , ans  ;	
    ans = 2 * pi * r ;  // assignment statement  assignment is always performed from right to left 
                        // = is the assignment operator 	 
     cout << ans  << endl ;	
    return 0;
}