+ 5

Hey can anybody help me in..

in array (c language) hw to write program for simple interest [10] ???

16th Jun 2017, 3:34 PM
Vega
Vega - avatar
3 odpowiedzi
+ 4
#include<stdio.h> int main() {   int amount, rate, time, si;  printf("\nEnter Principal Amount : ");  scanf("%d", &amount); printf("\nEnter Rate of Interest : "); scanf("%d", &rate); printf("\nEnter Period of Time   : "); scanf("%d", &time); si = (amount * rate * time) / 100; printf("\nSimple Interest : %d", si); return(0); }
18th Jun 2017, 12:38 PM
Shivam Pandey
Shivam Pandey - avatar
+ 1
#include <stdio.h> void main() { int n, p, r; printf("Enter the number of years\n"); scanf("%d",&n); printf("Enter the principal amount \n"); scanf("%d",&p); printf("Enter the rate of interest\n"); scanf("%d",&r); //Formula for simple interest. //reusing the variable p as simple interest. p = (n*p*r)/100; printf("\nSimple interest is = (%d)",p); }
5th Aug 2017, 2:46 AM
Soluchan
Soluchan - avatar
+ 1
by using array , you want to reduced the space complexcity . good
20th Feb 2018, 8:48 PM
suneel singh
suneel singh - avatar