Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Testing Tools @ OneStopTesting : WinRunner @ OneStopTesting |
Topic: C++ Code for testers |
|
Author | Message |
ravbinz
Newbie Joined: 26Aug2007 Location: New Zealand Online Status: Offline Posts: 1 |
Topic: C++ Code for testers Posted: 27Aug2007 at 1:24am |
#include <iostream>//header file included//using std::cout;using std::cin;using std::endl;int main()//main declared//{ int accountnumber;//variable declared to accept the account number// int i=0; double balatbeg; double charges; double credits; double newbalance; double allowedlimit;while (i<=10){ cout<<"Enter the account number of the customer:"; //Statement to take the account number//cin>>accountnumber; //variable to store accout number//cout<<"Enter the Balance at the Beginning of the month:"; //Statement to take to balance at the beginning of the month//cin>>balatbeg; //variable to store balance at the beginning//cout<<"Enter the Total of all items charged for this month:"; cin>>charges; //variable to store items charged//cout<<"Enter the total number of credits applied to this customer:"; cin>>credits; //variable to store credits//cout<<"Enter the Allowed credit limit for this customer:"; cin>>allowedlimit; //variable to store limit//newbalance=balatbeg+charges-credits; //To calculate the New Balance if (newbalance>=allowedlimit) //To check the condition and display appropriate message//cout<<"Credit Limit Exceeded for"<<accountnumber<<"with a new balance"<<newbalance<<"And credit limit"<<allowedlimit; cout<<endl; cout<<endl; } //closing the while condition//i=i+1; //incrementing the value of i//return 0;} //closing the main function//
Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.