Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int difference, year=0, industry = 0, industrytwo = 0, industry1value=0, industry2value=0;
- printf("Please select year from 2011 to 2016.\n");
- scanf_s("%d", &year);
- printf("Please select industry.\n 1: Construction\n 2: Manufacturing\n 3: Marine\n 4: Transportation & Storage\n 5: Water Supply & Sewerage\n 6: Whole sale & Retail\n");
- scanf_s("%d", &industry);
- printf("hello");
- if (industry == 1)
- {
- industry1value = con[year - 2011];
- }
- else if (industry == 2)
- {
- industry1value = man[year - 2011];
- }
- else if (industry == 3)
- {
- industry1value = marine[year - 2011];
- }
- else if (industry == 4)
- {
- industry1value = TS[year - 2011];
- }
- else if (industry == 5)
- {
- industry1value = WSS[year - 2011];
- }
- else if (industry == 6)
- {
- industry1value = WSR[year - 2011];
- }
- printf("Please select industry.\n 1: Construction\n 2: Manufacturing\n 3: Marine\n 4: Transportation & Storage\n 5: Water Supply & Sewerage\n 6: Whole sale & Retail\n");
- scanf_s("%d", &industrytwo);
- printf("hello");
- if (industrytwo == 1)
- {
- industry2value = con[year - 2011];
- }
- else if (industrytwo == 2)
- {
- industry2value = man[year - 2011];
- }
- else if (industrytwo == 3)
- {
- industry2value = marine[year - 2011];
- }
- else if (industrytwo == 4)
- {
- industry2value = TS[year - 2011];
- }
- else if (industrytwo == 5)
- {
- industry2value = WSS[year - 2011];
- }
- else if (industrytwo == 6)
- {
- industry2value = WSR[year - 2011];
- }
- difference = industry2value - industry1value;
- printf("Difference is %d.\n", difference);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement