Program to display stock containing item code, C/C++ Programming

 THIS PROGRAM IS TO DISPLAY A STOCK CONTAINING ITEM CODE,ITEM NAME,PRICE AND ANOTHER STOCK WITH CODE & QUANTITY AND DISPLAY COMPLETE INFORMATION

#include
#include
#include
struct stock
  {
  int itemcode;
  char itemname[30];
  float unitprice;
  };

struct stock1
  {
  int itemcode;
  int quantity;
  };

void main()
    {
    clrscr();
    stock s[50];
    stock1 s1;
    float amt;
    int number;
    cout<<"enter the no. of items to be purchased : ";
    cin>>number;
    cout<    for(int i=0;i     {
     cout<<" Item code : ";
     cin>>s[i].itemcode;
     cout<<" Item name : ";
     gets(s[i].itemname);
     cout<<" Unit price of the item : ";
     cin>>s[i].unitprice;
     cout<     }
    cout<<"enter the item code of the item to be purchased : ";
    cin>>s1.itemcode;
    cout<<"enter the total quantity : ";
    cin>>s1.quantity;
    cout<
    for(i=0;i      {
      if (s[i].itemcode == s1.itemcode)
         {
         amt = s[i].unitprice * s1.quantity;
         clrscr();
         cout<<"\t B I L L "<<"\n\n";
         cout<<" item code  : "<         cout<<" item name  : "<         cout<<" unit price : "<         cout<<" quantity   : "<         cout<<"\n";
         cout<<" total amount  : "<         }
      else
        {
        clrscr();
        cout<<" THE ITEM IS NOT AVAILABLE ";
        }
      }
    getch();
    }

Posted Date: 10/22/2012 5:09:19 AM | Location : United States







Related Discussions:- Program to display stock containing item code, Assignment Help, Ask Question on Program to display stock containing item code, Get Answer, Expert's Help, Program to display stock containing item code Discussions

Write discussion on Program to display stock containing item code
Your posts are moderated
Related Questions

C Program to copy the contents of a file: void main()    {   ifstream fin("input.txt");   ofstream fout("output.txt");   char ch;   while (fin)       {

In POS system, cashier computer connect to printer using serial rs232 usb or cable. We need to capture data from that connection, and parsing the data to get total amount for every

create a program to populate the first array then the odd number is the second array and get the sum of the second array.

Relational Operators A relational operator is used to make comparison among two values. All these operators are binary and needs two operands. There are the following relationa

HOW CAN WE EASLY LEARN C++

What is the difference between early binding and late binding? What are advantages of early binding? a.) Late binding refers to function calls which aren't resolved until run t

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process

A: A class which is used to traverse through the objects maintained through a container class. There are _ve categories of iterators: output iterators, input iterators, forward ite