Skip to content

Commit

Permalink
Merge pull request #44 from Tameem-623/main
Browse files Browse the repository at this point in the history
Repo Rearrangement
  • Loading branch information
Hamas-ur-Rehman authored Oct 27, 2023
2 parents fc4b7ae + 44cebd6 commit 0046955
Show file tree
Hide file tree
Showing 273 changed files with 2,881 additions and 3,976 deletions.
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
#include <iostream>
#define line cout << endl; // for endl
using namespace std;

class BankAccount
{
long int balance,deposit_Amount,Withdraw_Amount;

public:
BankAccount()
{
balance = 1000;
}

// makes a deposit
void deposit()
{
cout << "Enter The amount you want to deposit = ";
cin >> deposit_Amount;
balance+= deposit_Amount;
}

// withdrawal
void Withdraw()
{
// if balance is below Rs. 500 then display message showing insufficient balance
if (balance <= 500)
{
cout << "Insufficient Balance";
line
}
else
{
cout << "Enter The amount you want to withdraw = ";
cin >> Withdraw_Amount;
balance-= Withdraw_Amount;
}
}

// displays the balance
void displayBalance()
{
cout
<< "Current Balance: " << balance;
}

};

int main()
{
BankAccount AC1;
cout<<"Welcome To The Bank";line
cout<<"You Account is being Opened with a Balance of 1000"; line
int choice=0;
while (choice>=0)
{
line
cout<<"(1) Deposit Amount";line
cout<<"(2) Withdraw Amount";line
cout<<"(3) View Balance";line
cout<<"(-1) To Exit";line
cin>>choice;


switch (choice)
{
case 1:
AC1.deposit();
break;

case 2:
AC1.Withdraw();
break;

case 3:
AC1.displayBalance();
break;

default:
break;
}
}
return 0;
#include <iostream>
#define line cout << endl; // for endl
using namespace std;

class BankAccount
{
long int balance,deposit_Amount,Withdraw_Amount;

public:
BankAccount()
{
balance = 1000;
}

// makes a deposit
void deposit()
{
cout << "Enter The amount you want to deposit = ";
cin >> deposit_Amount;
balance+= deposit_Amount;
}

// withdrawal
void Withdraw()
{
// if balance is below Rs. 500 then display message showing insufficient balance
if (balance <= 500)
{
cout << "Insufficient Balance";
line
}
else
{
cout << "Enter The amount you want to withdraw = ";
cin >> Withdraw_Amount;
balance-= Withdraw_Amount;
}
}

// displays the balance
void displayBalance()
{
cout
<< "Current Balance: " << balance;
}

};

int main()
{
BankAccount AC1;
cout<<"Welcome To The Bank";line
cout<<"You Account is being Opened with a Balance of 1000"; line
int choice=0;
while (choice>=0)
{
line
cout<<"(1) Deposit Amount";line
cout<<"(2) Withdraw Amount";line
cout<<"(3) View Balance";line
cout<<"(-1) To Exit";line
cin>>choice;


switch (choice)
{
case 1:
AC1.deposit();
break;

case 2:
AC1.Withdraw();
break;

case 3:
AC1.displayBalance();
break;

default:
break;
}
}
return 0;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Account Balance Manager:

This is a Bank Account manager which manages the account's balance Programmed using C++, and perform the following tasks:

📌 It creates a bank account with a deposit of minimum 1000 (Rs) initially.

📌 It allows the user to view their current balance, make dposites and withdraw the desired amount.

# Account Balance Manager:

This is a Bank Account manager which manages the account's balance Programmed using C++, and perform the following tasks:

📌 It creates a bank account with a deposit of minimum 1000 (Rs) initially.

📌 It allows the user to view their current balance, make dposites and withdraw the desired amount.

📌 In the end it shows the user their total account balance.
20 changes: 0 additions & 20 deletions CPP/Complex Calculator/Readme.md.md

This file was deleted.

19 changes: 19 additions & 0 deletions CPP/Complex Calculator/readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@

# Complex Number Calculator:

This is a Complex number Calculator programmed using C++ which takes two complex numbers as input from the user and perform calculations in the following manner:

📌 Allows the user to input real and imaginary part of the first complex number.

📌 Then the user is supposed to enter the operator for respective calculations:

1. Addition

2. Subtraction

3. Multiplication

4. Division

📌 Then the user is supposed to enter the real and imaginary part for the second complex number.

📌 Finally, the program calculates the respective calculation.
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
//Write a program to calculate and print the Electricity bill of a given customer. The customer id and unit consumed by the user should be taken from the keyboard and display the total amount to pay to the customer.
#include<iostream>
using namespace std;
main(){
int id, units;
float charges, surcharge, net;

cout<<"Enter customer ID: ";
cin>>id;
cout<<"Enter Consumed Unit by the Customer: ";
cin>>units;
cout<<"------------------------------------"<<endl<<endl;
cout<<"CUSTOMER ID.NUMBER: "<<id<<endl;
cout<<"UNITS CONSUMED: "<<units<<endl<<endl;

if(units<=199){
charges = units*1.20;
cout<<"Amount Charged @Rs. 1.20 per unit: "<<charges<<endl;
}

else if (units>=200,units<400){
charges = units*1.50;
cout<<"Amount Charged @Rs. 1.50 per unit: "<<charges<<endl;
}

else if(units>=400,units<600){
charges = units*1.80;
cout<<"Amount Charged @Rs. 1.80 per unit: "<<charges<<endl;
}

else if(units>=600){
charges = units*2.00;
cout<<"Amount Charged @Rs. 2.00 per unit: "<<charges<<endl;
}

charges > 400;
surcharge = charges * 0.15;
cout<<"Surcharge Amount: "<<surcharge<<endl;
net = surcharge + charges;
cout<<"Net Amount Paid by the Customer: "<<net<<endl;
}
//Write a program to calculate and print the Electricity bill of a given customer. The customer id and unit consumed by the user should be taken from the keyboard and display the total amount to pay to the customer.
#include<iostream>
using namespace std;
main(){
int id, units;
float charges, surcharge, net;

cout<<"Enter customer ID: ";
cin>>id;
cout<<"Enter Consumed Unit by the Customer: ";
cin>>units;
cout<<"------------------------------------"<<endl<<endl;
cout<<"CUSTOMER ID.NUMBER: "<<id<<endl;
cout<<"UNITS CONSUMED: "<<units<<endl<<endl;

if(units<=199){
charges = units*1.20;
cout<<"Amount Charged @Rs. 1.20 per unit: "<<charges<<endl;
}

else if (units>=200,units<400){
charges = units*1.50;
cout<<"Amount Charged @Rs. 1.50 per unit: "<<charges<<endl;
}

else if(units>=400,units<600){
charges = units*1.80;
cout<<"Amount Charged @Rs. 1.80 per unit: "<<charges<<endl;
}

else if(units>=600){
charges = units*2.00;
cout<<"Amount Charged @Rs. 2.00 per unit: "<<charges<<endl;
}

charges > 400;
surcharge = charges * 0.15;
cout<<"Surcharge Amount: "<<surcharge<<endl;
net = surcharge + charges;
cout<<"Net Amount Paid by the Customer: "<<net<<endl;
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#include<iostream>
// #include< >
#define line cout<<endl;// for endl
using namespace std;
main()
{
char arr[1000]; int alpha=0, num=0, space=0, special=0;
cout<<"Enter String ";line line
gets(arr); // Important it places characters of string in indexes of array.
for(int i=0; arr[i]!='\0'; i++){
if((arr[i]>='A' && arr[i]<='Z') || (arr[i]>='a' && arr[i]<='z')) alpha++;
else if(arr[i]>='0' && arr[i]<='9') num++;
else if(arr[i]==' ') space++;
else special ++;
}
cout<<"Number of Alphabets = "<<alpha;line
cout<<"Number of Numerals = "<<num;line
cout<<"Number of Spaces = "<<space;line
cout<<"Number of Special Characters = "<<special;
}
#include<iostream>
// #include< >
#define line cout<<endl;// for endl
using namespace std;
main()
{
char arr[1000]; int alpha=0, num=0, space=0, special=0;
cout<<"Enter String ";line line
gets(arr); // Important it places characters of string in indexes of array.
for(int i=0; arr[i]!='\0'; i++){
if((arr[i]>='A' && arr[i]<='Z') || (arr[i]>='a' && arr[i]<='z')) alpha++;
else if(arr[i]>='0' && arr[i]<='9') num++;
else if(arr[i]==' ') space++;
else special ++;
}
cout<<"Number of Alphabets = "<<alpha;line
cout<<"Number of Numerals = "<<num;line
cout<<"Number of Spaces = "<<space;line
cout<<"Number of Special Characters = "<<special;
}
File renamed without changes.
12 changes: 0 additions & 12 deletions CPP/Personal Assistant/README.md

This file was deleted.

Loading

0 comments on commit 0046955

Please sign in to comment.