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

Assignment Help:

 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();
    }


Related Discussions:- Program to display stock containing item code

Data structures, what are 3 conditions under which the sequential search of...

what are 3 conditions under which the sequential search of a list is preferable to binary search?

Define the modulo division operator in c language, Define the Modulo Divisi...

Define the Modulo Division Operator in c language? The C provides one more arithmetic operator % called as modulo division operator and this operator yields the remainder of an

Working a homework programming assignment in C++, I am working on a program...

I am working on a program that allows a player to play a game against the computer. In this game the player can only chose to draw 1, 2, or 3 toothpicks. How do I make restrictions

Program that will recursively prompt for input from the user, BACKGROUND: F...

BACKGROUND: FILE SYSTEMS  In a computer, a file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and ret

Array, how to pass array

how to pass array

Data structure and algorithm, implement two stacks in one array A[1...n] in...

implement two stacks in one array A[1...n] in such a way that neither stack overflows unless the total number of elements in both stacks together is n. For this you need to produce

Explain the parts of operators, Explain the parts of operators Assignm...

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

Introduction to c programming, How would you print the values of the variab...

How would you print the values of the variables words and lines so they appear in the form: There were 6040 words and 680 lines. Here, 6040 and 680 represent the values of the two

What does it mean to declare a destructor as static, d) a "static destructo...

d) a "static destructor" is a static member function of the class which accepts one argument - a pointer to the object of that class to be cracked. It is probably utilized along wi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd