C++ program for finding any percentage of any value.

in #programming7 years ago

Program

A program is set of instruction given by user to computer to perform a specific task.

computer program, in depth intend or else process in lieu of solving a riddle by means of a computer; supplementary specifically, an unambiguous, well thought-out string of computational advice indispensable near attain such a solution.

program Body

#include<iostream>
#include<math.h>
using namespace std;
class percentage{
private:
float amo,per,val;
public:
void calculate();
};
void percentage::calculate(){
cout<<"Please enter the amount of which you wanna find percentage"<<endl;
cin>>amo;
cout<<"Please enter what the percentage you find out of that value you entered"<<endl;
cin>>per;
val=(amo*per)/100;
cout<<"your "<<per<<" percentage of value "<<amo<<" "<<"is "<<val<<endl;
}
int main (){
percentage obj;
obj.calculate();
return 0;
}

Code written in C++

Source

I hope guys you liked it

Coin Marketplace

STEEM 0.21
TRX 0.25
JST 0.038
BTC 97111.20
ETH 3382.29
USDT 1.00
SBD 3.20