HOW TO CREATE A VARIABLE

A variable name can not be more than 31 character(some compiler might support up to 247),First character can be alphabet or _ (under score) .

int _sum=10;

int sum=10;

int sum_=10;

No comma and space can be given in a variable name.

Ex   int ram shyam=10;       //wrong

int ram,shyam=10;       //wrong  

No special symbol can be given in variable name other than _(under score).

Ex   int _sum=10;     //right

int $sum=10;     //wrong  

Program for calculating simple interest

#include<stdio.h>

void main()

{

  int p=100000;

  float r=9.5;

  int t=5;

  float simpleIntrest;

  simpleIntrest=(p*r*t)/100;

  printf(“%f”,simpleIntrest);

}

Output : 47500.00