Code Scrappers


Simple Interest C program


              #include<stdio.h>
              #include<stdlib.h>

              void main()
              {
                  int principal, t, SI, r;

                  printf("\nEnter Principal : ");

                  scanf("%d", &principal);

                  printf("\nEnter Rate of interest : ");

                  scanf("%d", &r);

                  printf("\nEnter Time Period : ");

                  scanf("%d", &t);

                  SI = (principal * r * t) / 100;

                  printf("\nSimple Interest : %d", SI);

              }
          



Output

      Enter Principal : 1000

      Enter Rate of interest : 5

      Enter Time Period : 2

      Simple Interest : 100