Google

Wednesday, January 13, 2010

CSC202 & ENG4033M : Arithmetic Operators



Text Version:

/* Arithmetic Operators */
#include "stdio.h"

int main()
{
int a=10, b=3, c=4;

printf("%d\n", a%b);
printf("%d\n", a/b);
printf("%d\n", a*b);
printf("%d\n", a + b);
printf("%d\n", a - b);
printf("%d\n", (a-b)/c);

return 0;
}

FLOATING POINT VERSION: