Upload
-
View
41
Download
2
Embed Size (px)
DESCRIPTION
c basics
Citation preview
6/3/13 C program for atm transactions
1/4www.cquestions.com/2011/08/c-program-for-atm-transactions.html
0
C language tricky good pointers questions answers and explanation operators data types arrays structures questions functions
recursion preprocessors, looping, file handling, strings questions switch case if else printf advance c linux objective types mcq
faq interview questions and answers with explanation and solution for freshers or beginners. Placement online written test prime
numbers Armstrong Fibonacci series factorial palindrome code programs examples on c c++ tutorials and pdf
C programming questions and answersC programming questions and answers
C tutorial C Programming Questions C Interview Questions C Programs C Test C programming pdf Program of c++ Create projects Sql Server
Apply Credit Card Online Get 5%* Cashback or 5X* Rewards. No Joining/Annual* fees. Apply Now apply.standardchartered.co.in
FT India - Mutual Funds Choose From FT's 6 Funds That Suits Your Investment Needs. Buy Now! www.franklintempletonmutualfund.in
HDFC Life Investment Plan Buy Sampoorn Samridhi Plan. And Enjoy Tax Benefits. Get Quote Now! hdfc-life-insurance.com
Search
C program for atm transactions
1. C code for atm transaction while currencies are 1000,500 and 100
2. ATM c program source code3. C program for atm machine4. C program for atm banking
#include<stdio.h>
int totalThousand =1000;int totalFiveFundred =1000;int totalOneHundred =1000;
int main(){
unsigned long withdrawAmount; unsigned long totalMoney;
int thousand=0,fiveHundred=0,oneHundred=0;
printf("Enter the amount in multiple of 100: "); scanf("%lu",&withdrawAmount);
0
► Objective C Programming
► ATM Online
► ATM Banking
► ATM Bank
► Using ATM Overseas
► ATM Solution
C program examples
C interview questions and answers
Data type questions
Variable naming rule questions
Operators questions
Control flow questions
Switch case questions
Looping questions
Pointer questions
String questions
Printf,Scanf questions
Preprocessor questions
Structure questions
Commad line argument
C questions in Linux
C online test
C mixed practice sets
C tricky questions
Example of recursion in c
C programming forums
C QUESTIONS AND ANSWERS
Memory mapping tutorial in c
C TUTORIAL
0ShareShare More Next Blog» Create Blog Sign In
6/3/13 C program for atm transactions
2/4www.cquestions.com/2011/08/c-program-for-atm-transactions.html
if(withdrawAmount %100 != 0){ printf("Invalid amount;"); return 0; }
totalMoney = totalThousand * 1000 + totalFiveFundred* 500 + totalOneHundred*100;
if(withdrawAmount > totalMoney){ printf("Sorry,Insufficient money"); return 0; }
thousand = withdrawAmount / 1000; if(thousand > totalThousand) thousand = totalThousand; withdrawAmount = withdrawAmount - thousand * 1000;
if (withdrawAmount > 0){ fiveHundred = withdrawAmount / 500; if(fiveHundred > totalFiveFundred) fiveHundred = totalFiveFundred; withdrawAmount = withdrawAmount - fiveHundred * 500; }
if (withdrawAmount > 0) oneHundred = withdrawAmount / 100;
printf("Total 1000 note: %d\n",thousand); printf("Total 500 note: %d\n",fiveHundred); printf("Total 100 note: %d\n",oneHundred);
return 0;}
Sample output:
Enter the amount in multiple of 100: 7800Total 1000 note: 7Total 500 note: 1Total 100 note: 3
1. Write a c program to convert decimal number to hexadecimal number.
2. Write a c program to convert decimal number to octal number.
3. Write a c program to convert octal number to decimal number.
4. Write a c program to convert octal number to hexadecimal number.
5. Write a c program to convert hexadecimal number to decimal number.
6. Write a c program to convert hexadecimal number to octal number.
7. Write a c program to convert binary number to decimal number.
8. Write a c program to convert binary number to hexadecimal number.
9. Write a c program to convert binary number to octal number.
10. Write a c program to convert decimal number to binary number.
11. Write a c program to convert hexadecimal number to binary number.
12. Write a c program to convert octal number to binary number.
13. Write a c program to convert farehnite to centigrade.
14. Write a c program to convert centigrade to fahrenheit.
15. Big list of c program examples
Recommendthis onGoogle
5 comments:
ajith 9/13/11, 11:29 PM
super
Reply
Variables tutorial in c
Data types tutorial in c
Storage classes tutorial in c
Looping tutorial in c
Pointers tutorial in c
Function tutorial in c
Array tutorial in c
Preprocessor tutorial in c
Advanced c tutorial
C program examples
C interview questions and answers
Check given number is primenumber or not using c program
MULTIPLICATION OF TWOMATRICES USING C PROGRAM
C multiple choice questions andanswers pdf
Write a c program to reverse a string
Find out the perfect number using cprogram
TO FIND FIBONACCI SERIES USINGC PROGRAM
Program to convert decimal to binaryin c
QUICK SORT USING C PROGRAM
POPULAR POSTS
Enter your email address:
Subscribe
Delivered by FeedBurner
SUBSCRIBE VIA EMAIL
C questions and answers
Debugging questions in c withanswers
Aptitude questions and answers in c
C basic questions
Multiple choice questions in c
C PROGRAMMING QUESTIONS AND ANSWER
STANDARD OF QUESTIONS ?
SUBSCRIBE TO
6/3/13 C program for atm transactions
3/4www.cquestions.com/2011/08/c-program-for-atm-transactions.html
Newer Post Home
Subscribe to: Post Comments (Atom)
Create a Link
Chamnan Chamnan 2/19/13, 3:49 PM
good web site
Reply
Anonymous 4/9/13, 9:29 AM
int totalFiveFundred =1000;
You misspelled Hundred :)
Reply
anil kumar 5/6/13, 8:25 PM
Reply
This comment has been removed by the author.
Anonymous 5/6/13, 8:34 PM
int main()
{
int amt;
printf("Enter the amount to withdraw : ");
scanf("%d",&amt);
printf("\nNotes of 1000 required are %d", amt/1000);
printf("\nWhile Notes of 500 required are %d", ((amt % 1000)/500));
printf("\nAnd notes of 100 required are %d",((amt % 1000)% 500)/100);
getch();
return 0;
}
Reply
Links to this post
► Debit Card ATM ► ATM of America ► ATM Machine ► ATM Placement
SHARE IT
MUST VISIT
Posts
Comments
C programming questions and answer
C questions and answers
Debugging questions in c withanswers
Aptitude questions and answers in c
C basic questions
Multiple choice questions in c
Objective questions of c
Program in c language
Simple program example in clanguage
Tricky c questions and answers
C programming online test
C Linux interview questions andanswers
Looping questions in c and answers
C string questions and answers withexplanation
C operator questions with answers
Check the given number ispalindrome number or not using cprogram
C pointers questions
Data type questions in c
Check given number is primenumber or not using c program
struct bit fields questions in c
C questions answers
C interview questions and answers
How to test palindrome in c++
Palindrome number in c++
Program of palindrome number inc++
C++ code to get sum of all oddnumbers in given range
MY HEADLINES
ritesh kumar
View my complete
profile
ABOUT ME
GOOGLE+ BADGE
6/3/13 C program for atm transactions
4/4www.cquestions.com/2011/08/c-program-for-atm-transactions.html
↑ Grab this Headline Animator
Join this siteJoin this site
w ithGoogleFriendConnect
C LOVER COMMUNITY
Copyright@ritesh kumar. Powered by Blogger.