Do math calculation on int type variable and output result - C Language Basics

C examples for Language Basics:Variable

Description

Do math calculation on int type variable and output result

Demo Code

#include <stdio.h>
#include <stdlib.h>
int main()/*from   w ww. j a va 2 s.co  m*/
{
   int contributed;
   int received;
   contributed = 65 - 19;
   received = 969 - 65;
   printf("for %i years.\n", contributed);
   printf("for %i years.\n", received);
   return(0);
}

Related Tutorials