Bcsl 021 Lab Solved

October 27, 2017 | Author: nishantgaurav23 | Category: Computing, Technology, Software, Computer Engineering, Computer Programming
Share Embed Donate


Short Description

Enjoy...

Description

PIXELES CLASSES

BCA & MCA (IGNOU)

Course Code : BCSL-021 Course Title : C Language Programming Assignment Number : BCA (II)/L-021/Assignment/2015 Maximum Marks : 50, Weightage : 25% This assignment has only one question. Answer the question. This question carries 40 marks. Rest 10 marks are for viva voce. You may use illustrations and diagrams to enhance the explanation. Please go through the guidelines regarding the assignments given in the programme guide for the format of presentation. 1. Write an interactive C program to perform weekly production and sales analysis of a company which prompts the user with the following options on the main menu: 1) Information about the Company 2) Details/Specifications of their Five Products 3) Price list of their Five Products 4) Weekly Matrix of Production and Sales 5) Total value of weekly Production and Sales 6) Grand total value of Production and Sales 7) Quit Enter your choice: If “1” is entered, should display the information about the Company. If “2” is entered, it should give the details/specifications about their 5 products. If “3” is entered, it should display the prices of their 5 products. If “4” is entered week-wise production and sales need to be shown after entering the values by the user. If “5” is entered total value of weekly production and sales need to be displayed. If “6” is entered grand total value of production and sales need to be displayed. And “7” is for Quit the program. If the user enters any letters or numbers other than the choice, redisplay the prompt. All outputs should go to the terminal and all inputs should come from the keyboard. (40 Marks) Note: You must execute the program and submit the program logic, sample input and output along with the necessary documentation for this practical question. Assumptions can be made wherever necessary. Ans: #include char prd[][15]={"Notebook","Pen","Pencil","Guide-book","Eraser"}; char price[]={20,10,5,40,3}; int i,q[5],s[5],tq=0,ts=0;

www.pixelesindia.com

PIXELES CLASSES

Page | 1

PIXELES CLASSES

BCA & MCA (IGNOU)

char prd_qty[5]; char prd_sales[5]; void company() PIXELES CLASSES

{

Page | 2

clrscr();

We are teaching IGNOU’s BCA &

printf("PIX Pvt. Ltd"); printf("\nAddress:19,Nangloi,Delhi-110041");

MCA Students

printf("\nContact:011-3456789");

Why join us?

} void product()

 Regular Classes

{

 BCA & MCA IGNOU Special

clrscr();

Institute

printf("\nItems details are...\n"); printf("%s :\t Long size Notebook\n",prd[0]);

 Free Trial Classes

printf("%s :\t Ball Pen with different colour\n",prd[1]);

 Subjective Knowledge

printf("%s :\t 4BH Pencil\n",prd[2]);

 Free PIXELES Guide Books

printf("%s :\t PIXELES Succes Key\n",prd[3]); printf("%s :\t Dust Free Eraser\n",prd[4]); }

(Prepared by our teachers)  Free Solved Assignments  Experienced Faculties

void disp_price() {

 100% Results

clrscr();

 Home Test Series

printf("\n*****Product price List*****\n"); for(i=0;i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF