Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to use cryptography class in c++ Pin
Anonymous24-Nov-04 4:04
Anonymous24-Nov-04 4:04 
AnswerRe: how to use cryptography class in c++ Pin
John M. Drescher24-Nov-04 5:29
John M. Drescher24-Nov-04 5:29 
GeneralRe: CStatic Control Pin
John R. Shaw24-Nov-04 3:27
John R. Shaw24-Nov-04 3:27 
GeneralRe: CStatic Control Pin
Antony M Kancidrowski24-Nov-04 3:42
Antony M Kancidrowski24-Nov-04 3:42 
GeneralRe: CStatic Control Pin
namaskaaram24-Nov-04 20:42
namaskaaram24-Nov-04 20:42 
GeneralCStatic Control Pin
shijuck24-Nov-04 2:59
shijuck24-Nov-04 2:59 
GeneralMedia Player 10 ActiveX Problem Pin
X204024-Nov-04 2:51
X204024-Nov-04 2:51 
GeneralC++ Help Pin
BRIMID24-Nov-04 1:37
BRIMID24-Nov-04 1:37 
Code does math calculations twice, gives exponential when amount is 1,000,000 and does not exit when n is entered for continuance. I would also like to know how to create this so the person using it could print the output.

// RWA's and Charges

#include <iostream>
using std::cout;
using std::cin;
using namespace std;

//using::endl;

int main()
{
int choice, c;
float amount,total,fee;
char choice3 ='y';

while(choice3=='y'|| choice3=='Y')
{

cout << "\nChoose from options below.\n";
cout << "\nEnter 1 to calculate total RWA cost.\n";
cout << "\nEnter 2 to calculate RWA base estimate.\n";
cout << "\n\t\tEnter your choice, then press the enter key:";
cin >> choice;


if (choice == 1){



cout << "\nEnter RWA Base Estimate, then press the enter key:$";
cin >> amount;
fee = amount * 0.04;
cout << "4% Management Fee:$" << fee <<"\n";
total = amount + fee;
cout << "Total:$" << total <<"\n";

if (total >= 1 && total <= 2499 ||total >= 1 && total <= 2,499)
{
cout << "Overhead:$" << total*0.1 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.1) <<"\n";
}
if (total >= 2500 && total <= 9999 ||total >= 2,500 && total <= 9,999 )
{
cout << "Overhead:$" << total*0.09 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.09) <<"\n";
}
if (total >= 10000 && total <= 24999 ||total >= 10,000 && total <= 24,999)
{
cout << "Overhead:$" << total*0.08 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.08) <<"\n";
}
if (total >= 25000 && total <= 49999 ||total >= 25,000 && total <= 49,999)
{
cout << "Overhead:$" << total*0.07 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.07) <<"\n";
}
if (total >= 50000 && total <= 99999 ||total >= 50,000 && total <= 99,999 )
{
cout << "Overhead:$" << total*0.05 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.05) <<"\n";
}
if (total >= 100000 && total <= 299999 ||total >= 100,000 && total <= 299,999)
{
cout << "Overhead:$" << total*0.03 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.03) <<"\n";
}
if (total >= 300000 && total <= 999999 ||total >= 300,000 && total <= 999,999)
{
cout << "Overhead:$" << total*0.015 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.015) <<"\n";
}
if (total >= 1000000 && total <= 2425000 ||total >= 1,000,000 && total <= 2,425,000)
{
cout << "Overhead:$" << total*0.005 <<"\n";
cout << "Total Obligation:$" << total + (total * 0.005) <<"\n";
}


}


if (choice == 2) {



cout << "\nEnter Total RWA Cost, then press the enter key:$";
cin >> amount;
fee = amount * 0.04;
cout << "4% Management Fee:$" << fee <<"\n";
total = amount - fee;
cout << "Total:$" << total <<"\n";

if (total >= 1 && total <= 2499 ||total >= 1 && total <= 2,499)
{
cout << "Overhead:$" << total*0.1 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.1) <<"\n";
}
if (total >= 2500 && total <= 9999 ||total >= 2,500 && total <= 9,999 )
{
cout << "Overhead:$" << total*0.09 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.09) <<"\n";
}
if (total >= 10000 && total <= 24999 ||total >= 10,000 && total <= 24,999 )
{
cout << "Overhead:$" << total*0.08 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.08) <<"\n";
}
if (total >= 25000 && total <= 49999 ||total >= 25,000 && total <= 49,999)
{
cout << "Overhead:$" << total*0.07 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.07) <<"\n";
}
if (total >= 50000 && total <= 99999 ||total >= 50,000 && total <= 99,999 )
{
cout << "Overhead:$" << total*0.05 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.05) <<"\n";
}
if (total >= 100000 && total <= 299999 ||total >= 100,000 && total <= 299,999)
{
cout << "Overhead:$" << total*0.03 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.03) <<"\n";
}
if (total >= 300000 && total <= 999999 ||total >= 300,000 && total <= 999,999 )
{
cout << "Overhead:$" << total*0.015 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.015) <<"\n";
}
if (total >= 1000000 && total <= 2425000 ||total >= 1,000,000 && total <= 2,425,000)
{
cout << "Overhead:$" << total*0.005 <<"\n";
cout << "Spendable Amount:$" << total - (total * 0.005) <<"\n";
}



}

cout <<"********************************************************************""\n";
cout <<"***** Rate Range Subtotal Max. Range *****""\n";
cout <<"***** .01 .1 $2,499 $250.00 $250.00 *****""\n";
cout <<"***** 0.09 $2,500 $9,999 $675.00 $675.00 *****""\n";
cout <<"***** 0.08 $10,000 $24,999 $800.00 $1,200.00 *****""\n";
cout <<"***** 0.07 $25,000 $49,999 $1,750.00 *****""\n";
cout <<"***** 0.05 $50,000 $99,999 $2,500.00 *****""\n";
cout <<"***** 0.03 $100,000 299,999 $6,000.00 *****""\n";
cout <<"***** 0.015 $300,000 $999,999 $10,500.00 *****""\n";
cout <<"***** 0.005 $1,000,000 $2,425,000 $7,125.00 *****""\n";
cout <<"********************************************************************""\n";



cout<<"Would You Like to Perform Another Calculation (Y/N)?";
cin>>choice3;

}


//return 0;
cin >> c;

}
GeneralRe: C++ Help Pin
Mike Danberg24-Nov-04 11:18
Mike Danberg24-Nov-04 11:18 
GeneralRe: C++ Help Pin
RYU^^24-Nov-04 13:48
RYU^^24-Nov-04 13:48 
Generalsmall doubt Pin
Tripura.K24-Nov-04 1:36
Tripura.K24-Nov-04 1:36 
GeneralRe: small doubt Pin
John R. Shaw24-Nov-04 3:56
John R. Shaw24-Nov-04 3:56 
GeneralWM_SHUTDOWN Notification to a dll Pin
AssemblySoft24-Nov-04 0:42
AssemblySoft24-Nov-04 0:42 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
ThatsAlok24-Nov-04 0:54
ThatsAlok24-Nov-04 0:54 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
AssemblySoft24-Nov-04 1:34
AssemblySoft24-Nov-04 1:34 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
Antony M Kancidrowski24-Nov-04 3:55
Antony M Kancidrowski24-Nov-04 3:55 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
AssemblySoft24-Nov-04 5:52
AssemblySoft24-Nov-04 5:52 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
Antony M Kancidrowski24-Nov-04 6:03
Antony M Kancidrowski24-Nov-04 6:03 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
AssemblySoft24-Nov-04 23:08
AssemblySoft24-Nov-04 23:08 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
ThatsAlok24-Nov-04 17:18
ThatsAlok24-Nov-04 17:18 
GeneralRe: WM_SHUTDOWN Notification to a dll Pin
AssemblySoft24-Nov-04 23:06
AssemblySoft24-Nov-04 23:06 
GeneralChanging font in treeview control Pin
Alpha Siera24-Nov-04 0:29
Alpha Siera24-Nov-04 0:29 
GeneralRe: Changing font in treeview control Pin
Jack Puppy24-Nov-04 0:54
Jack Puppy24-Nov-04 0:54 
GeneralMultiple row selection MSFlexGrid Pin
balajeedurai23-Nov-04 23:37
balajeedurai23-Nov-04 23:37 
Generalhelp....... Pin
namaskaaram23-Nov-04 23:13
namaskaaram23-Nov-04 23:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.