# C++ Program to Calculate Simple Interest By Passing Arguments | C++ Programming

## Algorithm to find percentage is as follows −

#### C++ Program To Calculate Income Tax Using Default Arguments

```START
Step 1 → Collect values for part and total
Step 2 → Apply formula { percentage = ( part / total ) × 100 }
Step 3 → Display percentage
STOP```

Pseudocode
Pseudocode for the algorithm can be written as −
procedure percentage()
`   `
`   VAR value, total`
`   percentage = value / total * 100`
`   RETURN percentage`
` `
`end procedure`

## Source Code

```#include<iostream>
using namespace std;
#include<iomanip>
int function1(float p,float r, float t)
{
return ((p*t*r)/100) ;
}
int main()
{
int p,t,r;
float si;
cout<<"Enter Principal, Rate , Interest Respectively\n";
cin>>p>>t>>r;
function1(p,t,r);
cout>>"The Simple Interest is ">>(p*t*r)/100;
}
>```

## OUTPUT

Enter Principal, Rate , Intrest Respectively
1000
5
5
The Simple Interest is 250
{"ft_lang_label":"__label__en","ft_lang_prob":0.7223492,"math_prob":0.91514534,"size":1288,"snap":"2020-45-2020-50","text_gpt3_token_len":320,"char_repetition_ratio":0.1394081,"word_repetition_ratio":0.083333336,"special_character_ratio":0.2810559,"punctuation_ratio":0.125,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99860674,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-24T03:39:17Z\",\"WARC-Record-ID\":\"<urn:uuid:e3327e00-ee62-46dd-a423-626cb2068c40>\",\"Content-Length\":\"273793\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a2ab7b9c-7dbe-4652-bc7c-e0fdffe765f3>\",\"WARC-Concurrent-To\":\"<urn:uuid:dc08694a-be7c-4396-a188-f47f13a302b4>\",\"WARC-IP-Address\":\"172.217.15.115\",\"WARC-Target-URI\":\"https://www.thecompletecodes.com/2018/06/cpp-program-to-calculate-simple-interest-by-passing-arguments.html\",\"WARC-Payload-Digest\":\"sha1:WKGY6CJCSWETZX4EPS2TREMBHJIBBKZL\",\"WARC-Block-Digest\":\"sha1:RWMNVGDHOIBHJFY77WP76JKBEUN6AXBR\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107881640.29_warc_CC-MAIN-20201024022853-20201024052853-00511.warc.gz\"}"}