సాధారణ మరియు మిశ్రమ వడ్డీని ఎలా లెక్కించాలి

సాధారణ మరియు మిశ్రమ వడ్డీని ఎలా లెక్కించాలి

గణితం అనేది ప్రోగ్రామింగ్‌లో అంతర్భాగం. మీరు ఈ ప్రాంతంలో సాధారణ సమస్యలను పరిష్కరించలేకపోతే, మీరు అవసరం కంటే చాలా కష్టపడతారు.





అదృష్టవశాత్తూ, ఎలా చేయాలో నేర్చుకోవడం చాలా కష్టం కాదు. ఈ వ్యాసంలో, పైథాన్, సి ++ మరియు జావాస్క్రిప్ట్ ఉపయోగించి సాధారణ వడ్డీ మరియు సమ్మేళనం వడ్డీని ఎలా లెక్కించాలో మీరు నేర్చుకుంటారు.





బిట్‌మోజీ ఖాతాను ఎలా సృష్టించాలి

మీరు సాధారణ వడ్డీని ఎలా లెక్కిస్తారు?

సింపుల్ వడ్డీ అనేది ఒక నిర్దిష్ట రేటుపై మరియు ఒక నిర్దిష్ట వ్యవధిలో సూత్రప్రాయంగా వసూలు చేయబడిన వడ్డీ మొత్తాన్ని లెక్కించడానికి ఒక పద్ధతి. కింది సూత్రాన్ని ఉపయోగించి మీరు సాధారణ ఆసక్తిని లెక్కించవచ్చు:





Simple Interest = (P x R x T)/100
Where,
P = Principle Amount
R = Rate
T = Time

సమస్య ప్రకటన

మీకు ఇవ్వబడింది సూత్రం మొత్తం , వడ్డీ రేటు , మరియు సమయం . మీరు ఇచ్చిన విలువలకు సాధారణ వడ్డీని లెక్కించి ముద్రించాలి. ఉదాహరణ : లెట్ సూత్రం = 1000, రేటు = 7, మరియు సమయ వ్యవధి = 2. సాధారణ వడ్డీ = (సూత్రం * రేటు * సమయ వ్యవధి) / 100 = (1000 * 7 * 2) / 100 = 140. అందువలన, అవుట్‌పుట్ 140.

సాధారణ ఆసక్తిని లెక్కించడానికి C ++ ప్రోగ్రామ్

సాధారణ ఆసక్తిని లెక్కించడానికి C ++ ప్రోగ్రామ్ క్రింద ఉంది:



// C++ program to calculate simple interest
// for given principle amount, time, and rate of interest.
#include
using namespace std;
// Function to calculate simple interest
float calculateSimpleInterest(float principle, float rate, float timePeriod)
{
return (principle * rate * timePeriod) / 100;
}

int main()
{
float principle1 = 1000;
float rate1 = 7;
float timePeriod1 = 2;
cout << 'Test case: 1' << endl;
cout << 'Principle amount: ' << principle1 << endl;
cout << 'Rate of interest: ' << rate1 << endl;
cout << 'Time period: ' << timePeriod1 << endl;
cout << 'Simple Interest: ' << calculateSimpleInterest(principle1, rate1, timePeriod1) << endl;
float principle2 = 5000;
float rate2 = 5;
float timePeriod2 = 1;
cout << 'Test case: 2' << endl;
cout << 'Principle amount: ' << principle2 << endl;
cout << 'Rate of interest: ' << rate2 << endl;
cout << 'Time period: ' << timePeriod2 << endl;
cout << 'Simple Interest: ' << calculateSimpleInterest(principle2, rate2, timePeriod2) << endl;
float principle3 = 5800;
float rate3 = 4;
float timePeriod3 = 6;
cout << 'Test case: 3' << endl;
cout << 'Principle amount: ' << principle3 << endl;
cout << 'Rate of interest: ' << rate3 << endl;
cout << 'Time period: ' << timePeriod3 << endl;
cout << 'Simple Interest: ' << calculateSimpleInterest(principle3, rate3, timePeriod3) << endl;
return 0;
}

అవుట్‌పుట్:

Test case: 1
Principle amount: 1000
Rate of interest: 7
Time period: 2
Simple Interest: 140
Test case: 2
Principle amount: 5000
Rate of interest: 5
Time period: 1
Simple Interest: 250
Test case: 3
Principle amount: 5800
Rate of interest: 4
Time period: 6
Simple Interest: 1392

సంబంధిత: సి ++, పైథాన్ మరియు జావాస్క్రిప్ట్‌లో సహజ సంఖ్య యొక్క అన్ని కారకాలను ఎలా కనుగొనాలి





సాధారణ వడ్డీని లెక్కించడానికి పైథాన్ ప్రోగ్రామ్

సాధారణ ఆసక్తిని లెక్కించడానికి పైథాన్ ప్రోగ్రామ్ క్రింద ఉంది:

# Python program to calculate simple interest
# for given principle amount, time, and rate of interest.
# Function to calculate simple interest
def calculateSimpleInterest(principle, rate, timePeriod):
return (principle * rate * timePeriod) / 100

principle1 = 1000
rate1 = 7
timePeriod1 = 2
print('Test case: 1')
print('Principle amount:', principle1)
print('Rate of interest:', rate1)
print('Time period:', timePeriod1)
print('Simple Interest:', calculateSimpleInterest(principle1, rate1, timePeriod1))
principle2 = 5000
rate2 = 5
timePeriod2 = 1
print('Test case: 2')
print('Principle amount:', principle2)
print('Rate of interest:', rate2)
print('Time period:', timePeriod2)
print('Simple Interest:', calculateSimpleInterest(principle2, rate2, timePeriod2))
principle3 = 5800
rate3 = 4
timePeriod3 = 6
print('Test case: 3')
print('Principle amount:', principle3)
print('Rate of interest:', rate3)
print('Time period:', timePeriod3)
print('Simple Interest:', calculateSimpleInterest(principle3, rate3, timePeriod3))

అవుట్‌పుట్:





Test case: 1
Principle amount: 1000
Rate of interest: 7
Time period: 2
Simple Interest: 140.0
Test case: 2
Principle amount: 5000
Rate of interest: 5
Time period: 1
Simple Interest: 250.0
Test case: 3
Principle amount: 5800
Rate of interest: 4
Time period: 6
Simple Interest: 1392.0

సంబంధిత: విభిన్న ప్రోగ్రామింగ్ భాషలలో FizzBuzz ఛాలెంజ్‌ను ఎలా పూర్తి చేయాలి

సాధారణ ఆసక్తిని లెక్కించడానికి జావాస్క్రిప్ట్ ప్రోగ్రామ్

సాధారణ ఆసక్తిని లెక్కించడానికి జావాస్క్రిప్ట్ ప్రోగ్రామ్ క్రింద ఉంది:

// JavaScript program to calculate simple interest
// for given principle amount, time, and rate of interest.
// Function to calculate simple interest
function calculateSimpleInterest(principle, rate, timePeriod) {
return (principle * rate * timePeriod) / 100;
}
var principle1 = 1000;
var rate1 = 7;
var timePeriod1 = 2;
document.write('Test case: 1' + '
');
document.write('Principle amount: ' + principle1 + '
');
document.write('Rate of interest: ' + rate1 + '
');
document.write('Time period: ' + timePeriod1 + '
');
document.write('Simple Interest: ' + calculateSimpleInterest(principle1, rate1, timePeriod1) + '
');
var principle2 = 5000;
var rate2 = 5;
var timePeriod2 = 1;
document.write('Test case: 2' + '
');
document.write('Principle amount: ' + principle2 + '
');
document.write('Rate of interest: ' + rate2 + '
');
document.write('Time period: ' + timePeriod2 + '
');
document.write('Simple Interest: ' + calculateSimpleInterest(principle2, rate2, timePeriod2) + '
');
var principle3 = 5800;
var rate3 = 4;
var timePeriod3 = 6;
document.write('Test case: 3' + '
');
document.write('Principle amount: ' + principle3 + '
');
document.write('Rate of interest: ' + rate3 + '
');
document.write('Time period: ' + timePeriod3 + '
');
document.write('Simple Interest: ' + calculateSimpleInterest(principle3, rate3, timePeriod3) + '
');

అవుట్‌పుట్:

Test case: 1
Principle amount: 1000
Rate of interest: 7
Time period: 2
Simple Interest: 140
Test case: 2
Principle amount: 5000
Rate of interest: 5
Time period: 1
Simple Interest: 250
Test case: 3
Principle amount: 5800
Rate of interest: 4
Time period: 6
Simple Interest: 1392

కాంపౌండ్ వడ్డీని ఎలా లెక్కించాలి

కాంపౌండ్ వడ్డీ అంటే ప్రధాన మొత్తానికి వడ్డీని జోడించడం. మరో మాటలో చెప్పాలంటే, ఇది వడ్డీపై ఆసక్తి. కింది సూత్రాన్ని ఉపయోగించి మీరు సమ్మేళనం వడ్డీని లెక్కించవచ్చు:

Amount= P(1 + R/100)T
Compound Interest = Amount – P
Where,
P = Principle Amount
R = Rate
T = Time

సమస్య ప్రకటన

మీకు ఇవ్వబడింది సూత్రం మొత్తం , వడ్డీ రేటు , మరియు సమయం . మీరు ఇచ్చిన విలువలకు సమ్మేళనం వడ్డీని లెక్కించి ముద్రించాలి. ఉదాహరణ : లెట్ సూత్రం = 1000, రేటు = 7, మరియు సమయం వ్యవధి = 2. మొత్తం = P (1 + R/100) T = 1144.9 సమ్మేళనం వడ్డీ = మొత్తం - ప్రిన్సిపల్ మొత్తం = 1144.9 - 1000 = 144.9 అందువలన, అవుట్‌పుట్ 144.9.

కాంపౌండ్ వడ్డీని లెక్కించడానికి C ++ ప్రోగ్రామ్

కాంపౌండ్ వడ్డీని లెక్కించడానికి C ++ ప్రోగ్రామ్ క్రింద ఉంది:

// C++ program to calculate compound interest
// for given principle amount, time, and rate of interest.
#include
using namespace std;
// Function to calculate compound interest
float calculateCompoundInterest(float principle, float rate, float timePeriod)
{
double amount = principle * (pow((1 + rate / 100), timePeriod));
return amount - principle;
}
int main()
{
float principle1 = 1000;
float rate1 = 7;
float timePeriod1 = 2;
cout << 'Test case: 1' << endl;
cout << 'Principle amount: ' << principle1 << endl;
cout << 'Rate of interest: ' << rate1 << endl;
cout << 'Time period: ' << timePeriod1 << endl;
cout << 'Compound Interest: ' << calculateCompoundInterest(principle1, rate1, timePeriod1) << endl;
float principle2 = 5000;
float rate2 = 5;
float timePeriod2 = 1;
cout << 'Test case: 2' << endl;
cout << 'Principle amount: ' << principle2 << endl;
cout << 'Rate of interest: ' << rate2 << endl;
cout << 'Time period: ' << timePeriod2 << endl;
cout << 'Compound Interest: ' << calculateCompoundInterest(principle2, rate2, timePeriod2) << endl;
float principle3 = 5800;
float rate3 = 4;
float timePeriod3 = 6;
cout << 'Test case: 3' << endl;
cout << 'Principle amount: ' << principle3 << endl;
cout << 'Rate of interest: ' << rate3 << endl;
cout << 'Time period: ' << timePeriod3 << endl;
cout << 'Compound Interest: ' << calculateCompoundInterest(principle3, rate3, timePeriod3) << endl;
return 0;
}

అవుట్‌పుట్:

Test case: 1
Principle amount: 1000
Rate of interest: 7
Time period: 2
Compound Interest: 144.9
Test case: 2
Principle amount: 5000
Rate of interest: 5
Time period: 1
Compound Interest: 250
Test case: 3
Principle amount: 5800
Rate of interest: 4
Time period: 6
Compound Interest: 1538.85

సంబంధిత: C ++, పైథాన్ మరియు జావాస్క్రిప్ట్‌లో శ్రేణిని ఎలా రివర్స్ చేయాలి

ps4 తో ps4 వెనుకకు అనుకూలంగా ఉంటుంది

కాంపౌండ్ వడ్డీని లెక్కించడానికి పైథాన్ ప్రోగ్రామ్

కాంపౌండ్ వడ్డీని లెక్కించడానికి పైథాన్ ప్రోగ్రామ్ క్రింద ఉంది:

# Python program to calculate compound interest
# for given principle amount, time, and rate of interest.
# Function to calculate compound interest
def calculateCompoundInterest(principle, rate, timePeriod):
amount = principle * (pow((1 + rate / 100), timePeriod))
return amount - principle
principle1 = 1000
rate1 = 7
timePeriod1 = 2
print('Test case: 1')
print('Principle amount:', principle1)
print('Rate of interest:', rate1)
print('Time period:', timePeriod1)
print('Compound Interest:', calculateCompoundInterest(principle1, rate1, timePeriod1))
principle2 = 5000
rate2 = 5
timePeriod2 = 1
print('Test case: 2')
print('Principle amount:', principle2)
print('Rate of interest:', rate2)
print('Time period:', timePeriod2)
print('Compound Interest:', calculateCompoundInterest(principle2, rate2, timePeriod2))
principle3 = 5800
rate3 = 4
timePeriod3 = 6
print('Test case: 3')
print('Principle amount:', principle3)
print('Rate of interest:', rate3)
print('Time period:', timePeriod3)
print('Compound Interest:', calculateCompoundInterest(principle3, rate3, timePeriod3))

అవుట్‌పుట్:

Test case: 1
Principle amount: 1000
Rate of interest: 7
Time period: 2
Compound Interest: 144.9000000000001
Test case: 2
Principle amount: 5000
Rate of interest: 5
Time period: 1
Compound Interest: 250.0
Test case: 3
Principle amount: 5800
Rate of interest: 4
Time period: 6
Compound Interest: 1538.8503072768026

సంబంధిత: శ్రేణిలోని అన్ని మూలకాల మొత్తాన్ని ఎలా కనుగొనాలి

కాంపౌండ్ వడ్డీని లెక్కించడానికి జావాస్క్రిప్ట్ ప్రోగ్రామ్

కాంపౌండ్ వడ్డీని లెక్కించడానికి జావాస్క్రిప్ట్ ప్రోగ్రామ్ క్రింద ఉంది:

// JavaScript program to calculate compound interest
// for given principle amount, time, and rate of interest.

// Function to calculate compound interest
function calculateCompoundInterest(principle, rate, timePeriod) {
var amount = principle * (Math.pow((1 + rate / 100), timePeriod));
return amount - principle;
}
var principle1 = 1000;
var rate1 = 7;
var timePeriod1 = 2;
document.write('Test case: 1' + '
');
document.write('Principle amount: ' + principle1 + '
');
document.write('Rate of interest: ' + rate1 + '
');
document.write('Time period: ' + timePeriod1 + '
');
document.write('Compound Interest: ' + calculateCompoundInterest(principle1, rate1, timePeriod1) + '
');
var principle2 = 5000;
var rate2 = 5;
var timePeriod2 = 1;
document.write('Test case: 2' + '
');
document.write('Principle amount: ' + principle2 + '
');
document.write('Rate of interest: ' + rate2 + '
');
document.write('Time period: ' + timePeriod2 + '
');
document.write('Compound Interest: ' + calculateCompoundInterest(principle2, rate2, timePeriod2) + '
');
var principle3 = 5800;
var rate3 = 4;
var timePeriod3 = 6;
document.write('Test case: 3' + '
');
document.write('Principle amount: ' + principle3 + '
');
document.write('Rate of interest: ' + rate3 + '
');
document.write('Time period: ' + timePeriod3 + '
');
document.write('Compound Interest: ' + calculateCompoundInterest(principle3, rate3, timePeriod3) + '
');

అవుట్‌పుట్:

Test case: 1
Principle amount: 1000
Rate of interest: 7
Time period: 2
Compound Interest: 144.9000000000001
Test case: 2
Principle amount: 5000
Rate of interest: 5
Time period: 1
Compound Interest: 250
Test case: 3
Principle amount: 5800
Rate of interest: 4
Time period: 6
Compound Interest: 1538.8503072768008

ఉచితంగా కోడ్ చేయడం నేర్చుకోండి: సాధారణ మరియు సమ్మేళనం వడ్డీతో ప్రారంభించండి

ఈ రోజుల్లో, కోడింగ్ ప్రభావం విపరీతంగా పెరుగుతోంది. మరియు దీనికి అనుగుణంగా, నైపుణ్యం కలిగిన కోడర్‌ల డిమాండ్ కూడా విపరీతంగా పెరుగుతోంది. అధిక ఫీజు చెల్లించిన తర్వాత మాత్రమే కోడ్ నేర్చుకోవచ్చనే అపోహ ప్రజల్లో ఉంది. కానీ అది నిజం కాదు. ఫ్రీకోడ్‌క్యాంప్, ఖాన్ అకాడమీ, యూట్యూబ్ మొదలైన ప్లాట్‌ఫారమ్‌ల నుండి పూర్తిగా కోడ్‌ని మీరు నేర్చుకోవచ్చు. కాబట్టి, మీకు పెద్ద బడ్జెట్ లేకపోయినా, మీరు తప్పిపోయినందుకు చింతించాల్సిన అవసరం లేదు.

షేర్ చేయండి షేర్ చేయండి ట్వీట్ ఇమెయిల్ ఉచితంగా కోడ్ ఎలా చేయాలో తెలుసుకోవడానికి 7 ఉత్తమ మార్గాలు

మీరు ఉచితంగా కోడ్ చేయడం నేర్చుకోలేరు. మీరు ఈ ప్రయత్నించిన మరియు పరీక్షించిన వనరులను ఇవ్వకపోతే తప్ప.

తదుపరి చదవండి
సంబంధిత అంశాలు
  • ప్రోగ్రామింగ్
  • పైథాన్
  • జావాస్క్రిప్ట్
  • కోడింగ్ ట్యుటోరియల్స్
రచయిత గురుంచి యువరాజ్ చంద్ర(60 కథనాలు ప్రచురించబడ్డాయి)

యువరాజ్ భారతదేశంలోని ఢిల్లీ విశ్వవిద్యాలయంలో కంప్యూటర్ సైన్స్ అండర్ గ్రాడ్యుయేట్ విద్యార్థి. అతను పూర్తి స్టాక్ వెబ్ డెవలప్‌మెంట్ పట్ల మక్కువ కలిగి ఉన్నాడు. అతను వ్రాయనప్పుడు, అతను వివిధ సాంకేతికతల లోతును అన్వేషిస్తున్నాడు.

యువరాజ్ చంద్ర నుండి మరిన్ని

మా వార్తాలేఖకు సభ్యత్వాన్ని పొందండి

టెక్ చిట్కాలు, సమీక్షలు, ఉచిత ఈబుక్‌లు మరియు ప్రత్యేకమైన డీల్స్ కోసం మా వార్తాలేఖలో చేరండి!

సభ్యత్వం పొందడానికి ఇక్కడ క్లిక్ చేయండి