Write an interactive C program to perform weekly production and sales analysis of a company – IGNOU MCA Assignment 2015 – 16

By | September 6, 2015

BACHELOR OF COMPUTER APPLICATIONS

Course Code : BCSL-021
Course Title : C Language Programming
Assignment Number : BCA(II)/L-021/Assignment/2015
Maximum Marks : 50
Weightage : 25%

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.

Note: You must execute the program and submit the program logic, sample input and output along with the necessary documentation for this practical questionAssumptions can be made wherever necessary.

#include<stdio.h>
#include<dos.h>
void main()
{
int NUM;
struct date D;
clrscr();
getdate(&D);
START:
printf(“\n______________________________________________________________________”);
printf(“\n\t Hindustan Unilever Limited”);
printf(“\n\t\t HUL”);
printf(“\n______________________________________________________________________”);
printf(“\t\t\tToday %d / %d / %d\n”,D.da_day,D.da_mon,D.da_year);
printf(“\n______________________________________________________________________”);
printf(“\n\n\t\tSELECT CHOICE\n”);
printf(“\n 1. Information about the Company\n”);
printf(“\n 2. Details/Specifications of their Five Products\n”);
printf(“\n 3. Price list of their Five Products\n”);
printf(“\n 4. Weekly Matrix of Production and Sales\n”);
printf(“\n 5. Total value of weekly Production and Sales\n”);
printf(“\n 6. Grand total value of Production and Sales\n”);
printf(“\n 7. Quit\n”);
printf(“______________________________________________________________________”);
printf(“\n\t\tENTER CHOICE HERE :”);
scanf(“%d”,&NUM);
switch(NUM)
{
case 1 : printf(“\n______________________________________________________________________”);
printf(“\n\t About us\n”);
printf(“\n______________________________________________________________________”);
printf(“\n\t Hindustan Unilever Limited (HUL) is India’s largest Fast Moving”);
printf(“\n\t Consumer Goods Company with a heritage of over 80 years in India”);
printf(“\n\t and touches the lives of two out of three Indians.”);
printf(“\n\t HUL works to create a better future every day and he lps people”);
printf(“\n\t feel good, look good and get more out of life with brands and”);
printf(“\n\t services that are good for them and good for others.With over 35”);
printf(“\n\t brands spanning 20 distinct categories such as soaps, detergents,”);
printf(“\n\t shampoos, skin care, toothpastes, deodorants, cosmetics, tea,”);
printf(“\n\t coffee, packaged foods, ice cream, and water purifiers,the Company”);
printf(“\n\t is a part of the everyday life of millions of consumers across India.”);
printf(“\n\t Its portfolio includes leading household brands such as Lux,Lifebuoy,”);
printf(“\n\t Surf Excel,Rin,Wheel,Fair & Lovely,Pond’s,Vaseline, Lakmé, Dove,”);
printf(“\n\t Clinic Plus, Sunsilk,Pepsodent,Closeup,Axe,Brooke Bond,Bru,Knorr,”);
printf(“\n\t Kissan, Kwality Wall’s and Pureit.”);
printf(“\n______________________________________________________________________”);
break;
case 2 : printf(“\n______________________________________________________________________”);
printf(“\n\t Details of of their Five Products\n”);
printf(“\n______________________________________________________________________”);
printf(“\n 1.BROOKE BOND RED LABEL\n”);
printf(“\n Since 1869, Brooke Bond has brought you the perfect tasting tea experience with the best chosen leaves from Assam.When made with a touch of your love, it gives your family that irresistible great taste which brings them together. Brooke Bond Red Label –Celebrating the Taste of Togetherness\n”);
printf(“\n 2.VIM\n”);
printf(“\n Created in 1885, the Vim brand is still innovating and using the magic of natural ingredient like Lemon to create unbeatable results over a hundred years later.\n”);
printf(“\n 3.RIN\n”);
printf(“\n Clothes talk for us. Rin plays an integral part in enabling us to look good by providing demonstrably superior whites, giving us the confidence to realize our ambitions\n”);
printf(“\n 4.DOMEX\n”);
printf(“\n The sheer power of Domex bleach gives you the confidence you need, eradicating all known germs.\n”);
printf(“\n 5.PUREIT\n”);
printf(“\n Pureit is the world’s most advanced range of in-home water purifiers. Pureit is breakthrough innovation designed by Hindustan Unilever and it provides complete protection from all water-borne diseases, unmatched convenience and affordability.\n”);
printf(“\n______________________________________________________________________”);
break;
case 3 : printf(“\n______________________________________________________________________”);
printf(“\n\t Rates- list for various Products”);
printf(“\n\t Below are the rates (Effective 1st April 2015)”);
printf(“\n______________________________________________________________________”);
printf(“\n\t 1.BROOKE BOND RED LABEL TEA”);
printf(“\n______________________________________________________________________”);
printf(“\n Weight\t\t250gms\t500gms\t 1kg\t 2kgs”);
printf(“\n Price\t\tRs.86\tRs.160\tRs.250\tRs.470”);
printf(“\n\t 2.VIM BAR”);
printf(“\n______________________________________________________________________”);
printf(“\n Weight\t\t100gms\t200gms300gms\t500gms”);
printf(“\n Price\t\tRs.20\tRs.35\tRs.50\tRs.75”);
printf(“\n\t 3.RIN WASHING POWDER”);
printf(“\n______________________________________________________________________”);
printf(“\n Weight\t\t250gms\t500gms\t 1kg\t 2kgs”);
printf(“\n Price\t\tRs.44\tRs.80\tRs.125\tRs.235”);
printf(“\n\t 4.DOMEX TOILET CLEANER”);
printf(“\n______________________________________________________________________”);
printf(“\n Weight\t\t500ml\t 1ltr\t 2ltrs\t 5ltrs”);
printf(“\n Price\t\tRs.60\tRs.110\tRs.200\tRs.450”);
printf(“\n\t 5.PUREIT WATER PURIFIER”);
printf(“\n______________________________________________________________________”);
printf(“\n MODEL\t\tUltima(RO+UV)\t Marvella(RO)”);
printf(“\n Price\t\tRs.19,000\tRs.15,000”);
printf(“\n______________________________________________________________________”);
break;
case 4 : printf(“\n______________________________________________________________________”);
printf(“\n\tWeekly Matrix of Production and Sales\n”);
printf(“\n______________________________________________________________________”);
printf(“\n\t 1.BROOKE BOND RED LABEL TEA”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 2.VIM BAR”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 3.RIN WASHING POWDER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 4.DOMEX TOILET CLEANER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 5.PUREIT WATER PURIFIER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n______________________________________________________________________”);
break;
case 5 : printf(“\n______________________________________________________________________”);
printf(“\n\tTotal value of weekly Production and Sales\n”);
printf(“\n______________________________________________________________________”);
printf(“\n\t 1.BROOKE BOND RED LABEL TEA”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 2.VIM BAR”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 3.RIN WASHING POWDER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 4.DOMEX TOILET CLEANER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 5.PUREIT WATER PURIFIER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n______________________________________________________________________”);
break;
case 6 : printf(“\n______________________________________________________________________”);
printf(“\n\tGrand total value of Production and Sales\n”);
printf(“\n______________________________________________________________________”);
printf(“\n\t 1.BROOKE BOND RED LABEL TEA”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 2.VIM BAR”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 3.RIN WASHING POWDER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 4.DOMEX TOILET CLEANER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n\t 5.PUREIT WATER PURIFIER”);
printf(“\n______________________________________________________________________”);
printf(“\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat”);
printf(“\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158”);
printf(“\n______________________________________________________________________”);
break;
case 7 : printf(“READY TO QUIT !!!”);
goto EXIT;

default: goto START;
}
EXIT:
getch();
}

Code:

 

[codesyntax lang=”c”]

c#include<stdio.h>
#include<dos.h>
void main()
{
int NUM;
struct date D;
clrscr();
getdate(&D);
START:
printf("\n______________________________________________________________________");
printf("\n\t Hindustan Unilever Limited");
printf("\n\t\t HUL");
printf("\n______________________________________________________________________");
printf("\t\t\tToday %d / %d / %d\n",D.da_day,D.da_mon,D.da_year);
printf("\n______________________________________________________________________");
printf("\n\n\t\tSELECT CHOICE\n");
printf("\n 1. Information about the Company\n");
printf("\n 2. Details/Specifications of their Five Products\n");
printf("\n 3. Price list of their Five Products\n");
printf("\n 4. Weekly Matrix of Production and Sales\n");
printf("\n 5. Total value of weekly Production and Sales\n");
printf("\n 6. Grand total value of Production and Sales\n");
printf("\n 7. Quit\n");
printf("______________________________________________________________________");
printf("\n\t\tENTER CHOICE HERE :");
scanf("%d",&NUM);
switch(NUM)
{
case 1 : printf("\n______________________________________________________________________");
printf("\n\t About us\n");
printf("\n______________________________________________________________________");
printf("\n\t Hindustan Unilever Limited (HUL) is India's largest Fast Moving");
printf("\n\t Consumer Goods Company with a heritage of over 80 years in India");
printf("\n\t and touches the lives of two out of three Indians.");
printf("\n\t HUL works to create a better future every day and he lps people");
printf("\n\t feel good, look good and get more out of life with brands and");
printf("\n\t services that are good for them and good for others.With over 35");
printf("\n\t brands spanning 20 distinct categories such as soaps, detergents,");
printf("\n\t shampoos, skin care, toothpastes, deodorants, cosmetics, tea,");
printf("\n\t coffee, packaged foods, ice cream, and water purifiers,the Company");
printf("\n\t is a part of the everyday life of millions of consumers across India.");
printf("\n\t Its portfolio includes leading household brands such as Lux,Lifebuoy,");
printf("\n\t Surf Excel,Rin,Wheel,Fair & Lovely,Pond’s,Vaseline, Lakmé, Dove,");
printf("\n\t Clinic Plus, Sunsilk,Pepsodent,Closeup,Axe,Brooke Bond,Bru,Knorr,");
printf("\n\t Kissan, Kwality Wall’s and Pureit.");
printf("\n______________________________________________________________________");
break;
case 2 : printf("\n______________________________________________________________________");
printf("\n\t Details of of their Five Products\n");
printf("\n______________________________________________________________________");
printf("\n 1.BROOKE BOND RED LABEL\n");
printf("\n Since 1869, Brooke Bond has brought you the perfect tasting tea experience with the best chosen leaves from Assam.When made with a touch of your love, it gives your family that irresistible great taste which brings them together. Brooke Bond Red Label –Celebrating the Taste of Togetherness\n");
printf("\n 2.VIM\n");
printf("\n Created in 1885, the Vim brand is still innovating and using the magic of natural ingredient like Lemon to create unbeatable results over a hundred years later.\n");
printf("\n 3.RIN\n");
printf("\n Clothes talk for us. Rin plays an integral part in enabling us to look good by providing demonstrably superior whites, giving us the confidence to realize our ambitions\n");
printf("\n 4.DOMEX\n");
printf("\n The sheer power of Domex bleach gives you the confidence you need, eradicating all known germs.\n");
printf("\n 5.PUREIT\n");
printf("\n Pureit is the world’s most advanced range of in-home water purifiers. Pureit is breakthrough innovation designed by Hindustan Unilever and it provides complete protection from all water-borne diseases, unmatched convenience and affordability.\n");
printf("\n______________________________________________________________________");
break;
case 3 : printf("\n______________________________________________________________________");
printf("\n\t Rates- list for various Products");
printf("\n\t Below are the rates (Effective 1st April 2015)");
printf("\n______________________________________________________________________");
printf("\n\t 1.BROOKE BOND RED LABEL TEA");
printf("\n______________________________________________________________________");
printf("\n Weight\t\t250gms\t500gms\t 1kg\t 2kgs");
printf("\n Price\t\tRs.86\tRs.160\tRs.250\tRs.470");
printf("\n\t 2.VIM BAR");
printf("\n______________________________________________________________________");
printf("\n Weight\t\t100gms\t200gms300gms\t500gms");
printf("\n Price\t\tRs.20\tRs.35\tRs.50\tRs.75");
printf("\n\t 3.RIN WASHING POWDER");
printf("\n______________________________________________________________________");
printf("\n Weight\t\t250gms\t500gms\t 1kg\t 2kgs");
printf("\n Price\t\tRs.44\tRs.80\tRs.125\tRs.235");
printf("\n\t 4.DOMEX TOILET CLEANER");
printf("\n______________________________________________________________________");
printf("\n Weight\t\t500ml\t 1ltr\t 2ltrs\t 5ltrs");
printf("\n Price\t\tRs.60\tRs.110\tRs.200\tRs.450");
printf("\n\t 5.PUREIT WATER PURIFIER");
printf("\n______________________________________________________________________");
printf("\n MODEL\t\tUltima(RO+UV)\t Marvella(RO)");
printf("\n Price\t\tRs.19,000\tRs.15,000");
printf("\n______________________________________________________________________");
break;
case 4 : printf("\n______________________________________________________________________");
printf("\n\tWeekly Matrix of Production and Sales\n");
printf("\n______________________________________________________________________");
printf("\n\t 1.BROOKE BOND RED LABEL TEA");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 2.VIM BAR");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 3.RIN WASHING POWDER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 4.DOMEX TOILET CLEANER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 5.PUREIT WATER PURIFIER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n______________________________________________________________________");
break;
case 5 : printf("\n______________________________________________________________________");
printf("\n\tTotal value of weekly Production and Sales\n");
printf("\n______________________________________________________________________");
printf("\n\t 1.BROOKE BOND RED LABEL TEA");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 2.VIM BAR");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 3.RIN WASHING POWDER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 4.DOMEX TOILET CLEANER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 5.PUREIT WATER PURIFIER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n______________________________________________________________________");
break;
case 6 : printf("\n______________________________________________________________________");
printf("\n\tGrand total value of Production and Sales\n");
printf("\n______________________________________________________________________");
printf("\n\t 1.BROOKE BOND RED LABEL TEA");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 2.VIM BAR");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 3.RIN WASHING POWDER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 4.DOMEX TOILET CLEANER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n\t 5.PUREIT WATER PURIFIER");
printf("\n______________________________________________________________________");
printf("\n Week days\tSun\tMon\tTue\tWed\tThu\tFri\tSat");
printf("\n Prod.\Sales\t86-44\t160-89\t250-180\t470-78\t455-15\t122-15\t333-158");
printf("\n______________________________________________________________________");
break;
case 7 : printf("READY TO QUIT !!!");
goto EXIT;

default: goto START;
}
EXIT:
getch();
}

[/codesyntax]

 

ScreenShots:

C_program_Sales_Report

C_program_Sales_Report_Output