Banking program.
Program:
#include<stdio.h>
main()
{
int x,y;
printf("Enter Total Amount = ");
scanf("%d", &y);
if(y>=1000)
{
x=y/1000;
y=y%1000;
printf("\n1000Tk= %d", x);
}
if(y>=500)
{
x=y/500;
y=y%500;
printf("\n500Tk= %d", x);
}
if(y>=100)
{
x=y/100;
y=y%100;
printf("\n100Tk= %d", x);
}
if(y>=50)
{
x=y/50;
y=y%50;
printf("\n50Tk= %d", x);
}
if(y>=20)
{
x=y/20;
y=y%20;
printf("\n20Tk= %d", x);
}
if(y>=10)
{
x=y/10;
y=y%10;
printf("\n10Tk= %d", x);
}
if(y>=5)
{
x=y/5;
y=y%5;
printf("\n5Tk= %d", x);
}
if(y>=2)
{
x=y/2;
y=y%2;
printf("\n2Tk= %d", x);
}
if(y>=1)
{
x=y/1;
y=y%1;
printf("\n1Tk= %d", x);
}
}
Program:
#include<stdio.h>
main()
{
int x,y;
printf("Enter Total Amount = ");
scanf("%d", &y);
if(y>=1000)
{
x=y/1000;
y=y%1000;
printf("\n1000Tk= %d", x);
}
if(y>=500)
{
x=y/500;
y=y%500;
printf("\n500Tk= %d", x);
}
if(y>=100)
{
x=y/100;
y=y%100;
printf("\n100Tk= %d", x);
}
if(y>=50)
{
x=y/50;
y=y%50;
printf("\n50Tk= %d", x);
}
if(y>=20)
{
x=y/20;
y=y%20;
printf("\n20Tk= %d", x);
}
if(y>=10)
{
x=y/10;
y=y%10;
printf("\n10Tk= %d", x);
}
if(y>=5)
{
x=y/5;
y=y%5;
printf("\n5Tk= %d", x);
}
if(y>=2)
{
x=y/2;
y=y%2;
printf("\n2Tk= %d", x);
}
if(y>=1)
{
x=y/1;
y=y%1;
printf("\n1Tk= %d", x);
}
}