Saturday, March 19, 2011

Arithmatic instruction

int a, b, sum;
Float average
a = 10;
b = 25;
c = a;
Sum = a+b+c;
        = 45;
Average = 45/3;
              = 15.00

Input Instruction:
  Scan f ( ) function is used to input integer.
Output Instruction:
  Print f ( ) function is used to print.
Variable declaration Instruction:
  int a;
  float b;
Control Instruction:
> Sequential control instruction.

> Selection control instruction.
> Looping control instruction.


include <stdio.h>
   main ( )
{
   int number
   Print f ("Enter an integer number/n");
   Scan f ("%d",& number);
   if (number<100)
   print f ("your number is smaller than 100/n/n");
   else
   Print f ("your number contains more than two digits/n");
   return 0;
}

No comments:

Post a Comment