Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS201 Introduction to Programming Assignment No.2 Semester Fall 2012
#1


CS201 Introduction to Programming Assignment No.2 Semester Fall 2012


please review it and correct it

#include <iostream>

using namespace std;


main()
{
int typ;
int unit;
int cus_nub;
int days,bill;

cout "1-----------Domectice User:";
cout "2-----------Commercial User:\n";
cout "Please Choose your chpice From the Above menu:\n";
cin>> typ;

switch (typ)

{
case (typ == 1):


cout "Please enter the customer number:";
cin>>cus_nub;
cout "Please enter unit consumed:";
cin>>uint;
cout "Please enter number of days:";
cin>>days;
if ( uint 100=<, )
{
bill=uint * 5 }
else if (unit 101=> && =>300)
{ bill = ((uint*8)+100)
}
else if (uint 301=> && =>500)
{ bill = ((unit * 10) + 230)}
}
break;
case (typ == 2)
cout t "Please enter the customer number:";
cin>>cus_nub;
cout "Please enter unit consumed:";
cin>>uint;
cout "Please enter number of days:";
cin>>days;
bill = uint*15
}}

if (days 11=>)
{ bill = bill +200 }
cout " Aount to be paid by te custoer No."cus_nub "is" bill n/;


break;
default:

cout "invalid entry\n";
break;}

}
)


0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS508- Modern Programming Languages Assignment No. 03 Solution January 2016 Vuhelper 0 4,564 01-20-2016, 05:43 PM
Last Post: Vuhelper
  CS401 assignment no 3 Solution 20th January 2016 Vuhelper 0 10,259 01-20-2016, 05:15 PM
Last Post: Vuhelper
  Human Computer Interaction (CS408) Assignment no 3 20th January 2016 Vuhelper 0 1,069 01-20-2016, 05:13 PM
Last Post: Vuhelper
  CS101 Introduction to Computing Assignment No.2 Solution Spring Semester 2013 Vuhelper 4 12,104 12-13-2014, 01:23 AM
Last Post: Vuhelper
  ENG101 English Comprehension Assignment No.1 Solution Spring Semester 2013 Vuhelper 3 4,609 11-25-2014, 03:35 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No. 3 Solution Spring Semester June 2013 Vuhelper 1 4,076 06-24-2013, 10:39 PM
Last Post: Vuhelper
  MGT101 Financial Accounting Assignment 2 Solution Spring Semester June 2013 Vuhelper 0 3,078 06-15-2013, 11:57 PM
Last Post: Vuhelper
  ISL201 Islamic Studies Assignment No.1 Solution Spring Semester 2013 Vuhelper 0 4,567 05-17-2013, 09:33 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No.2 Solution Spring Semester 2013 Vuhelper 5 6,529 05-17-2013, 02:55 AM
Last Post: Xpert
  ENG201 Assignment No.2 Solution Spring Semester 2013 Vuhelper 1 5,749 05-16-2013, 04:41 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)