-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from Tameem-623/main
Repo Rearrangement
- Loading branch information
Showing
273 changed files
with
2,881 additions
and
3,976 deletions.
There are no files selected for viewing
166 changes: 83 additions & 83 deletions
166
Bank Account System/BankAccount.cpp → CPP/Bank Account System/BankAccount.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
16 changes: 8 additions & 8 deletions
16
Bank Account System/README.md → CPP/Bank Account System/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
82 changes: 41 additions & 41 deletions
82
Electricity Bill/Electricity Bill.cpp → CPP/Electricity Bill/Electricity Bill.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
40 changes: 20 additions & 20 deletions
40
Key Word Indicator/KeywordIndicator.cpp → CPP/Key Word Indicator/KeywordIndicator.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.