Guest User

Untitled

a guest
Jun 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. float shop(char items, int quantity,char description,float item_price);
  5. int main(void){
  6. char items [15][7]={"SKU000","SKU001","SKU002","SKU003","SKU004","SKU005","SKU006","SKU007","SKU008","SKU009","","","","",""};
  7. int quantity [15]= {0};
  8. char description [15] [15]={"candy","sweets","toy","lamp","swater","t-shirt","dress","suit","mower","Laptop"};
  9. float item_price[15]={2.99,4.99,9.99,10.00,20.00,24.15,40.00,99.00,200.00,600.00,0.00,0.00,0.00,0.00,0.00};
  10.  
  11. shop(items,quantity,description,item_price);
  12. return 0;
  13. }
  14. float shop(char items, int quantity,char description,float item_price){
  15. int i;
  16. printf("Items\tQuantity\tDescription\tprice\n");
  17. puts("————————————-");
  18. for(i=0;i<15;i++){
  19. printf("%s\t%s\t%d\t%f\n",items[i],description[i],quantity[i],item_price[i]);
  20. }
  21. }
Add Comment
Please, Sign In to add comment