Jump to content

point of sales help

- - - - -

  • Please log in to reply
1 reply to this topic

#1
atoivan

atoivan

    Learning Programmer

  • Members
  • PipPipPip
  • 61 posts
i want creating a point of sales program in C for my shop() can any one tell me how to go about it .i started with some codes but i do not know how what to do next ,this is the codes i start with
now what i need is how do store all the items in one variables how to generate the item codes.how to make it work right

#include <stdio.h>

#include <stdlib.h>

main()

{

float u_prx = 0.0f; // unit price

float total=0.0f; // total

float G_total=0.0f; // grand total

char qtt_in_bl=0; // quntity in bottle

char qty_left=0; // quntity left

char items[50]; // item name

char code[10]; // item code

char sele; // seletion of data

puts(" Welcome to my sales Program");

puts("<1> \tAdd an item");

puts("<2> \tAdd the quntity");

puts("♥> \tAdd the unit price");

puts("<4> \tview items");

puts("<5> \tEdit stock");

puts("<6> \tDelete item");

puts("<7> \texit");


puts("Enter selection");

scanf("%c",&sele);


switch (sele)

{

case '1':

puts("Enter the name of item :");

scanf("%s",items);


break;

}

}


#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
When you're designing a full business application, the best method is not to start with writing code, but rather to begin by designing what your application will do, what data types/data structures will be involved, your core logic and program flow (i.e., flowcharts), and then you can get to starting to write code.

Start by thinking abstract. No code. What is your application going to need to be able to do?
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users