Sandwich and Softdrinks

View previous topic View next topic Go down

Sandwich and Softdrinks

Post  BaDz on Wed Aug 05, 2009 1:38 am

#include <stdio.h>

void main()
{
float softdrink,sandwich,price;
int so ,sa;
system("cls");

printf("Enter the price of the softdrink: ");
scanf("%f", &softdrink);

printf("Enter the price of the sandwich: ");
scanf("%f", &sandwich);

printf("How many softdrink(s) do you wish to order: ");
scanf("%d",&so);
printf("How many sandwiches do you wish to order: ");
scanf("%d",&sa);

sandwich= sandwich * sa;
softdrink= softdrink * so;

printf("\nTotal of Sandwiche(s) is %f",sandwich);
printf("\nTotal of Softdrink(s) is %f",softdrink);


price=sandwich+softdrink;
printf("\nTotal price is %f",price);

getch();

}

BaDz
Admin

Posts : 7
Join date : 2009-06-15

View user profile

Back to top Go down

.mArtin chuvah.hehehe

Post  miZs maLditA on Wed Aug 05, 2009 9:37 pm

.pwd ka mkabuhat ug knang basic lng nga program
.hehehe
.knang int,float, return 0 chuvah

ky mao pa na amo gklasehan
.kng k lng.salamat

miZs maLditA

Posts : 3
Join date : 2009-06-17
Age : 24
Location : lAnUzA,sUrigAo deL sUr

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum