Project Computer Science
Project Computer Science
PROJECT WORK
(COMPUTER SCIENCE)
SUNWAL, NEPAL
2018
1|Page
TRINITY INTERNATIONAL
A Project On
C PROGRAMMING
LANGUAGE
Submitted By:
SANJU GUPTA
Under Supervision Of
Mr. Lal Krishna Mallik
Date:
2074/11/28
Certificate
This is to certify that Mr. /Ms. SANJU GUPTA has successfully completed
his project work as per the requirement of the curriculum of GRADE-XII
(Computer Science) under NEB. S/he has completed his project work
within the prescribed period.
Registration No. :- 74270729’D’
3|Page
ACKNOWLEDMENT
Firstly, I would like to thank my subject teacher Mr. Arjun Pandey for his
guidance. Furthermore, I would like to thank to my friends for their
support and help on my project work.
I would like to thank my parents for their support without which this
assignment would not be completed.
4|Page
OBJECTIVES
This project comes with the basic objective of helping us students to excel
in ‘C’ programming and coding in ‘C’ language. The main objectives of the
project are enumerated below:-
1. To understand the fundamental concept of C programming
language.
2. To help students develop simple programs using different
features of C programming language such as operators and
expression, I/O functions, control structures, array, string,
structure, union, pointer and data file.
5|Page
Table of contents
1.Acknowledgement………………………………………………..…..4
2.Objective………………………………………………………..…….5
3.System study………………………………………………7
4.System analysis……………………………………………8
5.System Requirements………………………………………9
6.System Design……………………………………………..10
7.System Development (coding)……………………..………………13
8.Implementation………...…………………..…….…………………18
9.Conclusion...………………………………………………….……22
10. Bibliography….……………………………………….………..23
6|Page
System Study
7|Page
System Analysis
Need analysis.
Many of the office, especially the government offices seem to still
use old and traditional way of storing employee data in written files
format. This would take more effort in both recording and storing the
information so a new system was needed that could provide with
better versatile data management system that is easy to understand
and use and also be more capable of providing with backup data.
Feasibility analysis.
Technical: There was no technical risk in developing this system
whatsoever. The technology was available in order to design this
system and was completed with current available hardware and
software.
8|Page
System Requirements
1. Operating System
Windows 10, 8, 7, Vista and xp.
2. NET 4.5 Frameworks.
3. Turbo c/c++.
9|Page
Algorithm
1. Initialize the variables pin, amount and transaction with 1147, 1000
and ‘y’ respectively.
2. Ask for the pin from user. If the input pin is equal to 1147, then allow
for the further operations.
3. Use switch statement to do the operations like Check Balance,
Withdraw Cash, Deposit Cash and Quit.
4. For Check Balance simply print the variable amount as output and
exit.
5. For Withdraw Cash, first ask the amount to withdraw and store it in
the variable withdraw.
6. If withdraw % 100 != 0, then ask user to enter the amount in
multiplies of 100.
7. If withdraw amount is greater than (amount-500), then print the
output as “INSUFFICENT BALANCE”.
8. Otherwise subtract the variable withdraw from variable amount,
print the amount and exit.
9. For deposit operation, ask the user for amount and store it in the
variable deposit.
10. Add the variable deposit to variable amount, print the amount and
exit.
11. If quit, then finally ask the user if they wish to continue or not. Ask
them to type y/n and store it in the variable transaction.
12. If variable transaction is y/Y, then continue the operation.
Otherwise terminate the while loop by assigning 1 to variable k.
13.Enter the amount you want to transfer, then deduct the transfer
amount from current balance/amount.
10 | P a g e
Start
Read Menu
Menu == Menu
No No
Yes
Read Deposit
Read Transfer
Print Withdraw,deposit,transfer
11 | P a g e
SYSTEM DEVELOPMENT
#include <stdio.h>
unsigned long amount=1000, deposit, withdraw,transfer;
int choice, pin, k;
char transaction ='y';
void main()
{
printf("\n\t\t\t\tATM SYSTEM\n\n");
printf("\t\t\5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \
5 \5 \n");
printf("\t\t\5\t\t\t\t\t\5\n");
printf("\t\t\5\t\t\t\t\t\5\n");
printf("\t\t\5\tWelcome to ATM Service\t\t\5\n");
printf("\t\t\5\t\t\t\t\t\5\n");
printf("\t\t\5\t\t\t\t\t\5\n");
printf("\t\t\5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \5 \
5 \5 \n");
12 | P a g e
printf("1. Check Balance\n");
printf("2. Withdraw Cash\n");
printf("3. Deposit Cash\n");
printf("4. Transfer Cash\n");
printf("5. Quit\n");
printf("PLEASE ENTER YOUR CHOICE FOR
TRANSACTION\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch (choice)
{
case 1:
printf("\n YOUR BALANCE IN Rs : %lu ",
amount);
break;
case 2:
printf("\n ENTER THE AMOUNT TO
WITHDRAW: ");
scanf("%lu", &withdraw);
if (withdraw % 100 != 0)
{
printf("\n PLEASE ENTER THE AMOUNT
IN MULTIPLES OF 100");
}
else if (withdraw >(amount - 500))
{
printf("\n INSUFFICENT BALANCE");
}
else
{
amount = amount - withdraw;
13 | P a g e
printf("\n\n PLEASE COLLECT CASH");
printf("\n YOUR CURRENT BALANCE IS
%lu", amount);
}
break;
case 3:
printf("\n ENTER THE AMOUNT TO
DEPOSIT:");
scanf("%lu", &deposit);
amount = amount + deposit;
printf("YOUR BALANCE IS %lu", amount);
break;
case 4:
printf("\n ENTER THE AMOUNT DO YOU
WANT TO TRANSFER:");
scanf("%lu", &transfer);
amount=amount - transfer;
printf("YOUR TRANSFER AMOUNT IS %lu \
n",transfer);
printf("YOUR CURRENT BALANCE IS %lu \
n",amount);
break;
case 5:
printf("\n THANKS FOR USING ATM
SERVICES");
break;
default:
printf("\n INVALID CHOICE");
}
printf("\n\n\n DO U WISH TO HAVE ANOTHER
TRANSCATION?(y/n): \n");
fflush(stdin);
scanf("%c", &transaction);
14 | P a g e
if (transaction == 'n'|| transaction == 'N')
k = 1;
} while (!k);
printf("\n\n THANKS FOR USING OUR ATM SERVICE");
}
15 | P a g e
Display
16 | P a g e
17 | P a g e
18 | P a g e
19 | P a g e
20 | P a g e
21 | P a g e
CONCLUSION
22 | P a g e
BIBLIOGRAPHY
23 | P a g e
24 | P a g e