Print Page | Close Window

C++ Code for testers

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: WinRunner @ OneStopTesting
Forum Discription: WinRunner is an automated functional GUI testing tool that allows a user to record and play back UI interactions as test scripts using a proprietary Test Script Language (TSL).
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=2212
Printed Date: 13Dec2024 at 11:43pm


Topic: C++ Code for testers
Posted By: ravbinz
Subject: C++ Code for testers
Date 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//

 

 




Print Page | Close Window