You are on page 1of 13

Responsive Application Using C-programming

Language As Base Architecture


( SHEH-NAAz )
A.S.M Eftiyar Nasim , Suraieya Islam , Md Fazle Rabby , Jhion Adbar Opi , Sirat E Alam

CSE Department, Daffodil International University

Abstract— We made a application base program of our EXPERIMENT


company name as SHEH-NAAz. By this program we can
operate our food delivery operation, Arithmetical operation As our business is a startup and only use as B2B
for purchase product, taking order, payment method, B2B system so we use code blocks to develop the
business management. application. We took idea from other professional
codes. Then we started to gather ideas to build the
logic. Then we started making responsive code. We
Keywords--- Food delivery, operation, Arithmetical individually execute all fraction codes. When it is
operation, purchase product, taking order, payment method, logical for our main target we started to combine ours
B2B business management. codes. We discuss it with people and friends. Finally
we combined our all programs under a main function
and all prototype function in the outside of main
INTRODUCTION function. These are the only header files for the
programs,
For our business it is difficult to use different kinds of
programs individually. So, we made a particular #include<stdio.h>
responsive application that can (1) Welcome our
customer; (2) Ask for login, profile; (3) Menu card #include<string.h>
entry; (4) Count quantity; (5) Generate payment
method; (6) Process Order for our company SHEH-
NAAz. #include<stdio.h>

#include<string.h>

char logo();
DISCUSSION
char firstpage();
For basic responsive application, we use function,
pointer, array, string. Basically, we applied the call by char login();
reference and call by value. We made so that every
char loginorforget();
function is connected by string through pointer. We
use switch case for change topic as requested. For char forget();
chose the order of item and payment system we use if
else statement as condition. Occasionally break is use char creact();
as demand. All add, sub, multifaction as done as char signup();
Arithmetical operation. Array is use into address
function for better execution. void login1();

void menu();

void profile();
void fastfood(); int mkon(); firstpage();

void fuska(); char mango(); break;

void jhalfuska(); int mmango(); default:

char orderorback(); char rice(); logo();

void order(); char chickenbeaf(); break;

int paybil(); void chickenrice(); }

void cotpoti(); float mchicken(); return;

void jhalcotpoti(); void beaf(); }

char corderorback(); float mbeaf();

void pizza(); void chicken(); char firstpage()

void hmpizza(); char friedsizzling(); {

void largepizza(); void friedchicken(); char n;

void minipizza(); float mfriedchicken(); printf("\t\*Do you have any


account?press \"YES or NOT\"\n");
void hmmpizza(); void sizzlingchicken();
scanf("%s",&n);
int drinks(); float msizzlingchicken();
switch(n)
int coca(); int address();
{
int fourml();
case 'y':
int sixml(); int main()
loginorforget();
int botolprice(); {
break;
int botolpricet(); logo();
case 'n':
int one(); }
creact();
int oneprice();
break;
int water(); char logo()
}
int fourmlw(); {
}
int sixmlw(); char s;

int onew(); printf("\t\t\t\t\t\tWelcome To


SHEH-NAAz! Dear Customer char creact()
int oneww(); \^\_\^\n");
{
int botolpricew(); printf("\n\t\* If you want to enter
on this page,please char r;
int botolpricetw();
press\"Enter\"\n");
printf("\t\*Do you want to creact a
int onepricew(); new account??\"yes or not\"\n");
scanf("%s",&s);
int botolpricetwo(); scanf("%s",&r);
switch(s)
void icecream(); switch(r)
{
char konmango(); {
case 'e':
char kon(); case 'y':
signup(); else char n[2];

break; creact(); scanf("%s\n%s",&n[0],&n[1]);

case 'n': } switch(n[1])

firstpage(); {

break; case 'l':

case 'Y': char loginorforget() login1();

signup(); { break;

break; printf("\t\*What do you want Login case 'L':


or forget password or beak previous
case 'N': page??\n"); login1();

firstpage(); char lf; break;

break; scanf("%s",&lf); case 'b':

} if(lf=='l'||lf=='L') loginorforget();

} { break;

login(); case 'B':

char signup() } loginorforget();

{ else if(lf=='f'||lf=='F') break;

printf("\t\*Enter your user { default:


name,phone number,NID
number,password and signup\n\t\*If forget(); login();
you want to back previous page
} }
press\"Back\"");
else if(lf=='b'||lf=='B') }
int phn,nid;

char ups[]={0,1,2}; {

firstpage(); char forget()


scanf("%s\n%d\n%d\n%s\n%s",&u {
}
ps[0],&phn,&nid,&ups[1],&ups[2]);
printf("\t\t\* Enter your phone
if(ups[2]=='s'||ups[2]=='S') number and press \"Search\"\t\*If
} you want to back previous page
{
press\"Back\"\n");
printf("\t\*Thank you\nYour
int phn;
account is ready.please login
again\n"); scanf("%d",&phn);
char login()
firstpage(); char s;
{
} scanf("%s",&s);
printf("\t\*please enter you phn
else if(ups[2]=='b'||ups=='B') number and passwor and pressed if(s=='S'||s=='s')
login:\n");
{ {
int p;
creact(); printf("\t\*Eftiyar nasim\nsent
scanf("%d",&p); pin\n");
}
} char m[6]; rice();

else if(s=='b'||s=='B') break;

{ printf("\t\*We have \"\*FAST case 'R':


FOOD; \*DRINKS; \*ICE CREAM;
loginorforget(); \*RICE; \*CHICKEN AVAILABLE rice();
HERE\"\n");
} break;
printf("\n\n\t\*Which Dish Would
else case 'c':
You Like To Order??press the name
printf("\n\n"); of food:\n\t\*If you want to back chicken();
previous page press\"Back\"\n");
} break;
scanf("%s",&m[6]);
case 'C':
switch(m[6])
void login1() chicken();
{
{ break;
case 'b':
printf("\n\t\*where are you want default:
to go? \*Menu card \*Back login1();
\*profile\n"); menu();
case 'B':
char lo; break;
login1();
scanf("%s",&lo);
case 'f':
if(lo=='M'||lo=='m') }
fastfood();
{
break;
menu(); }
case 'F':
}
fastfood();
else if(lo=='b'||lo=='B') void profile()
break;
{ {
case 'd':
loginorforget(); printf("\n\t\*change phone
drinks(); number\n\t\*Change
} Name\n\t\*Change password and
break;
press DONE\n\t\*If you want to back
else if(lo=='p'||lo=='P') previous page press\"Back\"\n");
case 'D':
{ char chng[4];
drinks;
profile(); int pchng;
break;
} scanf("%d",&pchng);
case 'I':
else
icecream();
scanf("%s\n%s\n%s",&chng[0],&ch
login1();
break; ng[1],&chng[2]);

case 'i':
} if(chng[2]=='d'||chng[2]=='D'||chng[
icecream(); 2]=='b'||chng[2]=='B')
break; {
void menu()
case 'r': login1();
{
} { else if(ob=='b'||ob=='B')

else printf("\n\t\*How many plate {


Fuska do you want to take\n");
profile(); fuska();
int j;
}
scanf("%d",&j);
} }
jhalfuska(j);

}
void fastfood() void order()
else if(jf=='c'||jf=='C')
{ {
{
printf("\t\*In fast food part,we
have\" \*fuska \*pizza\" available cotpoti();
here\n"); printf("\t\*\"THANK YOU\"for
} your confirmation\n");
printf("\t\*Which one Would You
Like To Order??press the name of } printf("\t\*What do you want to
food:\n"); pay the bill
through?\n\t\*Bkash\n\t\*Rocket\n\t
char fa; \*Nagad\n");
void jhalfuska(int j)
scanf("%s",&fa); char p;
{
if(fa=='f'||fa=='f') scanf("%s",&p);
float y,k;
{ paybil(p);
k=j*40;
fuska(); }
printf("\t\*Your bill=%.3f\n",k);
}
y=0.05*k;
else if(fa=='p'||fa=='P') int paybil(p)
printf("\t\*vat=%.3f\n",y);
{ {
printf("\t\* Totall
pizza(); bill=%.3f\n\n",y+k);
if(p=='B'||p=='b'||p=='r'||p=='R'||p=='
} printf("\*What do you want
n'||p=='N');
\'order\'or\'back\'\n");
} {
char ob;
printf("Sent the money on this
scanf("%s",&ob);
number\"01725425339\"and press
void fuska()
orderorback(ob); \"sent\"\n");
{
} int nmbr;
printf("\n\t\*What do you
scanf("%d",&nmbr);
want??\n\t\t\*Fuska=40\n\t\t\*Cotpo
ti=30\n"); char s;
char orderorback(ob)

{ scanf("%s",&s);

if(ob=='o'||ob=='O') switch(s)
char jf; {
{
scanf("%s",&jf); case 's':
order();
if(jf=='f'||jf=='F') address();
}
break; } printf("How many slices of pizza
would you like?\n");
case 'S':
int pip;
address(); char corderorback(ob)
scanf("%d",&pip);
break; {
hmpizza(pip);
default: if(ob=='o'||ob=='O')
}
paybil(p); {

break; order();

}
void hmpizza(pip)
} else if(ob=='b'||ob=='B')
{
} {
float x,z;
} cotpoti();
x=pip*360;
}
z=0.07*360;
void cotpoti() }
printf("\t\*Your bill=%.3f\n",x);
{
printf("\t\*vat=%.3f\n",z);
printf("\n\t\*How many plate void pizza()
Cotpoti do you want to take\n"); printf("\t\* Totall
{ bill=%.3f\n\n",x+z);
int j;
printf("\n\t\\t\*What kind of pizza printf("\*What do you want
scanf("%d",&j); you want?\n\t\*Large size=360+vat \'order\'or\'back\'\n");
tk & Mini size=280\,please press the
jhalcotpoti(j); name\n"); char ob;
} char lm; scanf("%s",&ob);

scanf("%s",&lm); if(ob=='b'||ob=='B')
jhalcotpoti(int j) if(lm=='l' || lm=='L') {
{ { pizza();
float y,k; largepizza(); }
k=j*30; } else if(ob=='o' || ob=='O')
printf("\t\*Your bill=%.3f\n",k); else if(lm=='m' || lm=='M') {
y=0.05*k; { order();
printf("\t\*vat=%.3f\n",y); minipizza(); }
printf("\t\* Totall }
bill=%.3f\n\n",y+k);
} }
printf("\*What do you want
\'order\'or\'back\'\n");

char ob; void largepizza() void minipizza()

scanf("%s",&ob); { {

corderorback(ob);
printf("How many slices of pizza printf("\t\*Which one Would You }
would you like?\n"); Like To Order??press the name of
drink:\n"); }
int mpi;
char dr; int fourml()
scanf("%d",&mpi);
scanf("%s",&dr); {
hmmpizza(mpi);
if(dr=='c'||dr=='C') printf("\t\*How many bottles do
} you want to take\n");
{
int bo;
coca();
void hmmpizza(mpi) scanf("%d",&bo);
}
{ botolprice(bo);
else if(dr=='w'||dr=='W')
float a,b; }
{
a=mpi*280;
water();
b=0.07*280; int sixml()
}
printf("\t\*Your bill=%.3f\n",a); {
}
printf("\t\*vat=%.3f\n",b); printf("\t\*How many bottles do
you want to take\n");
printf("\t\* Totall
bill=%.3f\n\n",a+b); int coca() int bot;

printf("\*What do you want { scanf("%d",&bot);


\'order\'or\'back\'\n");
printf("\t\*How many milliliters botolpricet(bot);
char ob; of Coca-cokal would you like to
take?\"400 or 600 or 1 }
scanf("%s",&ob); liters\"\n\t\*400ML=25tk
\*600ML=30tk\*1 liters=60\n");
if(ob=='b'||ob=='B')
int botolprice(bo)
int ml;
{
{
scanf("%d",&ml);
pizza();
int c;
switch(ml)
}
c=bo*25;
{
else if(ob=='o' || ob=='O')
printf("\t\*Your total
case 400:
{ price=%d\n",c);
fourml();
order(); printf("\*What do you want
break; \'order\'or\'back\'\n");
}
case 600: char od;
}
sixml(); scanf("%s",&od);

break; if(od=='o'||od=='O')
int drinks()
case 1: {
{
one(); order();
printf("\t\*In drinks part,we
have\" \COCACOLA \*Water\" break; }
available here\n");
else if(od=='b'||od=='B')
{ { case 1:

drinks(); int o; onew();

} o=on*60; break;

} printf("\t\*Your total
price=%d\n",o);
}
printf("\*What do you want
int botolpricet(bot) \'order\'or\'back\'\n"); }

{ char one;
int d; scanf("%s",&one); int fourmlw()

d=bot*30; if(one=='o'||one=='O') {

printf("\t\*Your total { printf("\t\*How many bottles do


price=%d\n",d); you want to take\n");

printf("\*What do you want int wo;


\'order\'or\'back\'\n"); }
scanf("%d",&wo);
char od; else if(one=='b'||one=='B')
botolpricew(wo);
scanf("%s",&od); {
}
if(od=='o'||od=='O') drinks();

{ }
int botolpricew(wo)
order(); }
{
}
int d;
else if(od=='b'||od=='B') int water()
d=wo*30;
{ {
printf("\t\*Your total
drinks(); printf("\t\*How many milliliters price=%d\n",d);
of water would you like to
} take?\"400 or 600 or 1 printf("\*What do you want
liters\"\n\t\*400ML=30tk \'order\'or\'back\'\n");
}
\*600ML=40tk\*1 liters=50\n");
char ow;
int ml;
scanf("%s",&ow);
int one()
scanf("%d",&ml);
if(ow=='o'||ow=='O')
{
switch(ml)
{
printf("\t\*How many bottles do
{
you want to take\n"); order();
case 400:
int on; }
fourmlw();
scanf("%d",&on); else if(ow=='b'||ow=='B')
break;
oneprice(on); {
case 600:
} drinks();
sixmlw();
}
break;
int oneprice(on)
} int won; konmango( *ptr);

scanf("%d",&won); }

int sixmlw() botolpricetwo(won);

{ } char konmango(ic)

printf("\t\*How many bottles do {


you want to take\n");
int botolpricetwo(won) if(ic=='k'|| ic=='K')
int wot;
{ {
scanf("%d",&wot);
int f; kon();
botolpricetw(wot);
f=won*50; }
}
printf("\t\*Your total else if(ic=='M'|| ic=='m')
price=%d\n",f);
{
int botolpricetw(wot) printf("\*What do you want
\'order\'or\'back\'\n"); mango();
{
char wao; }
int e;
scanf("%s",&wao); }
e=wot*40;
if(wao=='o'||wao=='O')
printf("\t\*Your total
price=%d\n",e); { char kon()

printf("\*What do you want order(); {


\'order\'or\'back\'\n");
} printf("\t\*How many kon ice-
char wa; cream do you want to take?\n");
else if(wao=='b'||wao=='B')
scanf("%s",&wa); int k;
{
if(wa=='o'||wa=='O') scanf("%d",&k);
drinks();
{ int *ptr=&k;
}
order(); int **pptr=&ptr;
}
} mkon(**pptr);

else if(wa=='b'||wa=='B') }
void icecream()
{
{
drinks(); int mkon(mk)
printf("\t\*In ICE-CREAM part
} we have\" \*kon icecream=70tk+vat {
\*mango icecream=90tk+vat\"
} int e,f;
available here\n");
e=mk*70;
printf("\t\*Which one Would You
Like To Order??press the name of f=0.05*e;
int onew()
food:\n");
{ printf("\t\*Your bill is=%d",e);
char i;
printf("\t\*How many bottles do printf("\t\*Your vat=%d",f);
scanf("%s",&i);
you want to take\n");
printf("\t\*Your total
char *ptr=&i; bill=%d\n",e+f);
printf("\*What do you want printf("\*What do you want case 'C':
\'order\'or\'back\'\n"); \'order\'or\'back\'\n");
chickenrice();
char ic; char icm;
break;
scanf("%s",&ic); scanf("%s",&icm);
case 'b':
if(ic=='o'||ic=='O') if(icm=='o'||icm=='O')
beaf();
{ {
break;
order(); order();
case 'B':
} }
beaf();
else if(ic=='b'||ic=='B') else if(icm=='b'||icm=='B')
break;
{ {
}
icecream(); icecream();
}
} }

void chickenrice()
} }
{
char rice()
printf("\t\*How many Plate do
char mango() { you want to take?\n");

{ printf("\t\*In Rice part we have\" int ri;


\*chicken rice=180tk+vat \*Beaf
printf("\t\*How many mango ice- Rice=280tk+vat\" available here\n"); scanf("%d",&ri);
cream do you want to take?\n");
printf("\t\*Which one Would You int *ptr=&ri;
int m; Like To Order??press the name of
int **pptr=&ptr;
food:\n");
scanf("%d",&m);
mchicken(**pptr);
char r;
int *ptr=&m;
}
scanf("%s",&r);
int **pptr=&ptr;
char *ptr=&r;
mmango(**pptr);
float mchicken(ricee)
char **pptr=&ptr;
}
{
chickenbeaf(**pptr);
float i,k;
}
int mmango(mm)
i=ricee*180;
{
k=0.05*i;
char chickenbeaf(ric)
int g,h;
printf("\t\*Your bill is=%f",i);
{
g=mm*90;
printf("\t\*Your vat=%f",k);
switch(ric)
h=0.05*g;
printf("\t\*Your total
{
printf("\t\*Your bill is=%d",g); bill=%f\n",i+k);
case 'c':
printf("\t\*Your vat=%d",h); printf("\*What do you want
chickenrice(); \'order\'or\'back\'\n");
printf("\t\*Your total
bill=%d\n",g+h); break; char ic;
scanf("%s",&ic); scanf("%s",&ic); friedchicken();

if(ic=='o'||ic=='O') if(ic=='o'||ic=='O') break;

{ { case 's':

order(); order(); sizzlingchicken();

} } break;

else if(ic=='b'||ic=='B') else if(ic=='b'||ic=='B') case 'S':

{ { sizzlingchicken();

rice(); rice(); break;

} } }

} }

void chicken() void friedchicken()

void beaf() { {

{ printf("\t\*In this part we have\" printf("\t\*How many plate do you


\*fried chicken(3piece in one want to take?\n");
printf("\t\*How many Plate do plate)=100tk+vat \*sizzling
you want to take?\n"); chicken(the bowl)=180tk+vat\" int fr;
available here\n");
int rii; scanf("%d",&fr);
printf("\t\*Which one Would You
scanf("%d",&rii); int *ptr=&fr;
Like To Order??press the name of
int *ptr=&rii; food:\n"); int **pptr=&ptr;

int **pptr=&ptr; char r; mfriedchicken(**pptr);

mbeaf(**pptr); scanf("%s",&r); }

} char *ptr=&r;

char **pptr=&ptr; float mfriedchicken(friee)

float mbeaf(ricee) friedsizzling(**pptr); {

{ } float i,k;

float i,k; i=friee*100;

i=ricee*280; char friedsizzling(chic) k=0.05*i;

k=0.05*i; { printf("\t\*Your bill is=%f",i);

printf("\t\*Your bill is=%.3f",i); switch(chic) printf("\t\*Your vat=%f",k);

printf("\t\*Your vat=%.3f",k); { printf("\t\*Your total


bill=%f\n",i+k);
printf("\t\*Your total case 'f':
bill=%.3f\n",i+k); printf("\*What do you want
friedchicken();
\'order\'or\'back\'\n");
printf("\*What do you want
break;
\'order\'or\'back\'\n"); char ic;
case 'F':
char ic; scanf("%s",&ic);
if(ic=='o'||ic=='O') float msizzlingchicken(sizz)

{ {

order(); float i,k; int address()

} i=sizz*180; {

else if(ic=='b'||ic=='B') k=0.05*i;

{ printf("\t\*Your bill is=%.3f",i); char adrs[5];

chicken(); printf("\t\*Your vat=%.3f",k); printf("\n\t\*Where to get your


food delivered?\n");
} printf("\t\*Your total
bill=%.3f\n",i+k); printf("\t\*Enter the name of your
} area:\n");
printf("\*What do you want
\'order\'or\'back\'\n"); scanf("%s",&adrs[0]);
void sizzlingchicken() char ic; printf("\t\*Enter the name of
police station of your home belong
{ scanf("%s",&ic); to\n");
printf("\t\*How many bowl do if(ic=='o'||ic=='O') scanf("%s",&adrs[1]);
you want to take?\n");
{ printf("\t\*aenter your nick
int siz;
name\n");
order();
scanf("%d",&siz);
scanf("%s",&adrs[2]);
}
int *ptr=&siz;
int addrs[]={0,1};
else if(ic=='b'||ic=='B')
int **pptr=&ptr;
printf("\t\*Enter your phone
{
msizzlingchicken(**pptr); number:\n");
chicken();
} scanf("%d",&addrs[0]);
}
printf("\t\*Enter the road number
} of your house?\n");

scanf("%d%s",&addrs[1],&adrs[4]
);

printf("\t\*Press \"DoNe\"\n");

scanf("%s",&adrs[3]);

if(adrs[3]=='d'||adrs[3]=='D')

printf("\n\tThank you
Dear\n\t\tYou will receiver your
product within 30minutes\n");

else

…………………………………………… address();

}
Output CONCLUSION

To conclusion, the entire project has 1022 lines, we


have to survey those lines. We have showed all the
concepts of switch case, from if else to array, from
loop to function , from function to pointers, pointers to
string, call by value and call by reference etc.

ACKNOWLEDGMENT

We learned programming from our respected teachers,


Apna college, various online platform like
Geeksforgeeks, beecrowd etc. We would like to thank
our course teacher Sir Mr. Golam Rabbani.

REFERENCES

1. LET US C by Yashavant K.
2. Introduction To Algorithms
3. W3school.
4. GitHub

You might also like