saving . . . saved Assignment has been deleted. Assignment has been hidden .
Assignment
Title
Question
Assignment program for calculating simple interest

#include <stdio.h>
int main()
{
    float principle, time, rate, SI;
    printf("Enter principle amount: ");
    scanf("%f", &principle);
    printf("Enter time: ");
    scanf("%f", &time);
    printf("Enter rate: ");
    scanf("%f", &rate);
    /* Calculate simple interest */
    SI = (principle * time * rate) / 100;
    printf("Simple Interest = %f", SI);
    return 0;
}


Haripriya,ECE department
IRTT

C-and-Cpp Tokens 01-02 min 10-20 sec 06-12-21, 6:02 p.m. Harisj

Answers:

Assignments are only for self-assessment. If you have any specific question related to this tutorial please post here.
10-01-22, 1:15 p.m. hbammkanti


#Include<stdio.h>
#include<conio.h>
void main()
{
float p,t,r;
double si;
printf("enter the p value:");
scanf("%f",&p);
printf("enter the t value:");
scanf("%f",&t);
printf("enter the r value");
scanf("%f",&r);
si=(p*t*r)/100;
printf("si=%lf,si);
getch();
05-08-24, 2:40 p.m. 238T1A05D8


#include<stdio.h>
#include<conio.h>
int main()
{
   float principle, time, rate, SI;
   printf("enter principle amount:");
   scanf("%d", &principle);
   printf("enter time:");
   scanf("%d", &time);
   printf("enter rate:");
   scanf("%d", &rate);
   SI=(principle* time* rate)/100;
   printf("simple interest=%d", SI);
   return 0;
}
05-08-24, 2:41 p.m. Nikki5D4


Assignment program to find the sum and average of any three given numbers.

#include<stdio.h>
int main()
{
   int a,b,c;
   float sum,avg;
   printf("Enter the a value:");
   scanf("%d",&a);
   printf("Enter the b value:");
   scanf(%d",&b);
   printf("Enter the c value:");
   scanf("%d",^&c);
   sum=a+b+c;
   avg=(a+b+c)/3;
   printf("Sum of given numbers is %d",sum);
   printf("Average of given numbers is %d",avg);
   return 0;
}

05-08-24, 2:46 p.m. ajayrahulpulli@gmail.com


 #include<stdio.h>
#include<conio.h>
int main()
{
   float principle, time, rate, SI;
   printf("enter principle amount:");
   scanf("%d", &principle);
   printf("enter time:");
   scanf("%d", &time);
   printf("enter rate:");
   scanf("%d", &rate);
   SI=(principle* time* rate)/100;
   printf("simple interest=%d", SI);
   return 0;
}
05-08-24, 3:23 p.m. tanmayi.P


 #include<stdio.h>
#include<conio.h>
int main()
{
   float principle, time, rate, SI;
   printf("enter principle amount:");
   scanf("%d", &principle);
   printf("enter time:");
   scanf("%d", &time);
   printf("enter rate:");
   scanf("%d", &rate);
   SI=(principle* time* rate)/100;
   printf("simple interest=%d", SI);
   return 0;
}
05-08-24, 3:23 p.m. 238T1A05D3


#include <stdio.h>
int main()
{
    float principle, time, rate, SI;
    printf("Enter principle amount: ");
    scanf("%f", &principle);
    printf("Enter time: ");
    scanf("%f", &time);
    printf("Enter rate: ");
    scanf("%f", &rate);
    /* Calculate simple interest */
    SI = (principle * time * rate) / 100;
    printf("Simple Interest = %f", SI);
    return 0;
}
12-08-24, 2:22 p.m. 238T1A05E1


#include<stdio.h>
#include<conio.h>
int main()
{
   float principle, time, rate, SI;
   printf("enter principle amount:");
   scanf("%d", &principle);
   printf("enter time:");
   scanf("%d", &time);
   printf("enter rate:");
   scanf("%d", &rate);
   SI=(principle* time* rate)/100;
   printf("simple interest=%d", SI);
   return 0;
}
12-08-24, 2:42 p.m. Shalini_09


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}

output
enter principle(amount):500
enter time:2
enter rate:5
Simple Interest=50.00
12-08-24, 3:01 p.m. 238T1A05G7


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}

output
enter principle(amount):500
enter time:2
enter rate:5
Simple Interest=50.00
12-08-24, 3:24 p.m. 238T1A05E2


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}

output:
enter principle(amount):500
enter time:2
enter rate:5
Simple Interest=50.00
12-08-24, 3:29 p.m. rehmatshaik795@gmail.com


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}
12-08-24, 4 p.m. 238T1A05G1


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}

16-08-24, 4:29 p.m. 238T1A05F5


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}

16-08-24, 4:29 p.m. 238T1A05F5


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}
19-08-24, 2:32 p.m. nasreensk2005@gmail.com


#include<stdio.h>
int main()
{
float principle,rate,time,SI;
printf("enter principle(amount):");
scanf("%f",&principle);
printf("enter time:");
scanf("%f",&time);
printf("enter rate:");
scanf("%f",&rate);
SI=(principle*time*rate)/100;
printf("Simple Interest=%.2f",SI);
return 0;
}
20-08-24, 7:28 p.m. shaiksaniyamehazabeen@gmail.com


Log-in to answer to this question.