double tk =0;
//double D_balance=0;
int eEbl_Card()
{
//int = kuno kichu purno shonkha buzhay . like as 1, 10 , 12 ,100
//float= dosmik ase amon shongkha .ebong dosmik er pore 2 ta shongkha thake
printf("Input your Valu: ") ;
scanf("%lf",&tk);
printf("\nMy present balance: %lf",tk);
}
int add_balance()
{
double add_balance;
printf("\ninput value for add: ");
scanf("%lf",&add_balance);
tk=tk+add_balance;
printf("\nbalance after adding: %lf",tk);
}
int sub_balance()
{
double sub_balance;
printf("\ninput value for subtruct: ");
scanf("%lf",&sub_balance);
tk=tk-sub_balance;
printf("\nbalance after sudstruction: %lf",tk);
}
int multi_balance()
{
double multi_balance;
printf("\ninput value for multiply: ");
scanf("%lf",&multi_balance);
tk=tk*multi_balance;
printf("\nbalance after multiply: %lf",tk);
}
int Divide_balance()
{
double D_balance=0;
printf("\ninput value for Divide: ");
scanf("%lf",&D_balance);
tk=tk/D_balance;
printf("\nbalance after divide: %lf",tk);
}
int new_entry()
{
double tk =0;
if_else();
}
void if_else()
{
double addSubMulDiv;
printf("\nHelp : \nPress 1 for add\nPress 2 for substraction\nPress 3 for Multiply\nPress 4 for Divided \npress 5 for exit\n");
scanf("%lf",&addSubMulDiv);
if (addSubMulDiv==1)
{
add_balance();
}
if (addSubMulDiv==2)
{
sub_balance();
}
if (addSubMulDiv==3)
{
multi_balance();
}
if (addSubMulDiv==4)
{
Divide_balance();
}
if(addsubMulDiv==5)
{
new_entry();
}
return if_else();
}
// jodi function main er pore likhe tahole proto tpe dite hoy . jodi age tahole prototype dite hoy na .
void main()
{
printf("CALCULATOR\n") ;
eEbl_Card();
//add_balance();
//sub_balance();
// multi_balance();
//Divide_balance();
if_else();
new_entry();
//add_balance();
//subtruct_balance();
}
No comments:
Post a Comment