answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <conio.h>

void main()

{

float p, r, si;

int t;

clrscr();

printf("Enter the values of p,r and t\n");

scanf ("%f %f %d", &p, &r, &t);

si = (p * r * t)/ 100.0;

printf ("Amount = Rs. %5.2f\n", p);

printf ("Rate = Rs. %5.2f%\n", r);

printf ("Time = %d years\n", t);

printf ("Simple interest = %5.2f\n", si);

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

int main()

{

int p,n,count;

float r,si;

count=1;

while(count<=3)

{

printf("\n enter values of p,n,andr");

scanf("%d %d %f",&p, &n, &r);

si=(float)p * (float)n * r / 100;

printf("simple interest =rs. %f",si);

count=count+1;

}

return(0);

}

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

#include<iostream>

#include<sstream>

#include<type_traits>

using namespace std;

double simple_interest (double principal, double interest_rate, unsigned term) {

double interest = 0;

for (unsigned year=0; year<term; ++year)

interest += (principal + interest) * interest_rate / 100;

return interest;

}

template<typename T>

T input_value (string prompt, T range_min, T range_max) {

static_assert (is_arithmetic<T>::value, "Arithmetic type expected");

T value;

string str;

stringstream ss;

while (true) {

cout << prompt << " [" << range_min << ':' << range_max << "]: ";

cin >> str;

ss << str;

if (ss>>value)

if (value<range_min range_max<value)

cerr << "Error: value out of range";

else

break;

}

return value;

}

int main() {

cout << "Simple Interest Calculator\n";

double principal {input_value<double> ("Enter the principal amount", 0, 1000)};

double rate {input_value<double> ("Enter the annual interest rate", 0, 100)};

unsigned term {input_value<unsigned> ("Enter the term of investment", 0, 25)};

double interest {simple_interest (principal, rate, term)};

cout << "Simple interest over a " << term << " year period: " << interest << endl;

}

Example output:

Simple Interest Calculator

Enter the principal amount [0:1000]: 1000

Enter the annual interest rate [0:100]: 10

Enter the term of investment [0:25]: 5

Simple interest over a 5 year period: 610.51

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

cout<<wat de hell is cookin man<<

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a C plus plus program to find simple interest using arguments?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

C program algorithm for simple interest using while loop?

Not used


What are the advantages of using simple interest?

Using simple interest is easier for people to understand. Customers will be able to manage their payments if a business uses simple interest.


Solve simple investment problems using the simple interest rate method?

find the interest on $4000 at 3.5% annual interest for 1 year 6 months


How do you write c file arguments?

Using parameters argc and argv, and library functions fopen, fprintf, fclose


Shell program for calculating compound interest using for loop?

yes


The amount of money charged for borrowing or using money?

Simple Interest


How long it would take for 20500 to earn an interest of 59648.75?

That would also depend on the interest rate, and whether you are using simple or compound interest.


What is the formula for finding time when using simple interest?

time= interest/principal x rate likee yeahh thats it


Can somebody give me the program to find simple interest using friend function in c plus plus?

Here is an example program: class obj{ public: float p,n,r,si; friend void calc( obj temp); }; void calc( obj temp){ si = (p*n*r)/100; } The initialization and function calling is essential.


What type of arguments are statistical arguments?

Arguments using numbers to prove their point.


Are there any benefits of using a rewards program?

It depends on the rewards program a person is using. For example, a credit card might have rewards, but then the interest one is paying will not make it worth it.


Simple c language program?

Well, this is a very open question, please be specific, I will try try to answer this as well, a simple c language program can be any thing from printing your name on the screen to printing some patterns using symbols, or making a small game, or a simple calculator program. you can a clearer picture of what can be a simple c language program here: