Find the Simple Interest : C Program

Computer Science » C Program » Find the Simple Interest

Program :

#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);
}

Output :

Enter Principal Amount : 100
Enter Rate of Interest : 5
Enter Period of Time   : 2
Simple Interest : 10
Subject Name : Computer Science
Exam Name : IIT GATE, UPSC ESE, RRB, SSC, DMRC, NMRC, BSNL, DRDO, ISRO, BARC, NIELIT
Posts Name : Assistant Engineer, Management Trainee, Junior Engineer, Technical Assistant
Computer Science Books

GATE 2023 Total InfoENGG DIPLOMAUGC NET Total Info
IES 2023 Total InfoPSUs 2022 Total InfoCSIR UGC NET Total Info
JAM 2023 Total InfoM TECH 2023 Total InfoRAILWAY 2022 Total Info

Related Posts

  • Find greatest in 3 numbers : C ProgramComputer Science » C Program » Find greatest in 3 numbers  Program : [php]#include&lt;stdio.h&gt; int main() { int a, b, c; printf(&quot;nEnter value of a, b &amp; c : &quot;); scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); if ((a &gt; b) &amp;&amp; (a &gt; c)) printf(&quot;na is greatest&quot;); if ((b &gt; c) &amp;&amp; (b &gt; a)) printf(&quot;nb is greatest&quot;); if ((c &gt; a) &amp;&amp; (c &gt; b)) printf(&quot;nc is greatest&quot;); return(0); }[/php] Output : [php]Enter value for a,b &amp; c : 12 16 20 c is greatest[/php]
    Tags: program, find, computer, science, output, programs
  • Even Number Pyramid : C ProgramComputer Science » C Program » Even Number Pyramid Program : [php]#include&lt;stdio.h&gt; int main() { int i, j, num = 2; for (i = 0; i &lt; 4; i++) { num = 2; for (j = 0; j &lt;= i; j++) { printf(&quot;%dt&quot;, num); num = num + 2; } printf(&quot;n&quot;); } return (0); }[/php] Output : [php]2 2 4 2 4 6 2 4 6 8 [/php]
    Tags: program, computer, science, output, programs
  • Find Largest Element in Array : C ProgramComputer Science » C Program » Find Largest Element in Array Program : [php]#include<stdio.h> int main() { int a[30], i, num, largest; printf("nEnter no of elements : "); scanf("%d", &num); //Read n elements in an array for (i = 0; i < num; i++) scanf("%d", &a[i]); //Consider first element as largest largest = a[0]; for (i = 0; i < num; i++) { if (a[i] > largest) { largest = a[i]; } } // Print out the Result printf("nLargest element is : %d", largest); return (0); }[/php] Output : [php]Enter no of elements : 5 10 20 30 40 50 Largest element is : 50[/php]
    Tags: program, find, computer, science, output, programs
  • Binary Numbers Pyramid : C ProgramComputer Science » C Program » Binary Numbers Pyramid  Program : [php]#include<stdio.h> int main() { int i, j; int count = 1; for (i = 1; i <= 5; i++) { printf("n"); for (j = 1; j <= i; j++) { printf("%d", count % 2); count++; } if (i % 2 == 0) count = 1; else count = 0; } return(0); }[/php] Output : [php]1 01 101 0101 10101[/php]
    Tags: program, computer, science, output, programs
  • 1-10 Numbers in Pyramid : C ProgramComputer Science » C Program » 1-10 Numbers in Pyramid Program : [php]#include<stdio.h> int main() { int i, j; int count = 1; for (i = 0; i <= 4; i++) { printf("n"); for (j = 0; j < i; j++) { printf("%dt", count); count++; } } return(0); }[/php] Output : [php]1 2 3 4 5 6 7 8 9 10 [/php]
    Tags: program, computer, science, output, programs

LEAVE A REPLY

Please enter your comment!
Please enter your name here