We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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

}
)

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 2399

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

#include<iostream.h>
#include<conio.h>
int main()


{
    int type;
    int units;
    int cust_num;
    int days, bill;

          cout"Press '1' ************* for Domestic user:\n"    ;
          cout"Press '2' ************* for Commercial use:\n"   ;

          cout"Please choose your desired type to calculate bill:  ;
          cin>>type;
          switch(type)
          {
          
          case 1:
                 cout"\nPlease enter the customer number:";
                 cin>>cust_num;
                 
                 cout"\nPlease enter the units consumed:";
                 cin>>units;
                 
                 cout"\nPlease enter number of days:";
                 cin>>days;
                           
                           if (units<=100)
                           {   
                           bill = units*5;
                           }
                               else if (units>i01 && units<=300)
                               {
                               bill = ((units*8) + (100));
                               }
                                    else if (units>301 && units<=500)
                                    {
                                    bill = ((units*10) + (230))
                                    }
                         
                         
                 cout"Amount to be paid by the customer No."cust_num" is "bill"\n";
                 braek;
           case 2:
                  cout"\nPlease enter the customer number:";
                  cin>>cust_num;
                  
                  cout"\nPlease enter the units consumed:";
                  cin>>units;
                  
                  cout"\nPlease enter the days:";
                  cin>>days;
                  
                  bill = units*15;
                                  if (days>10)
                                  {
                                  bill += 200
                                  }
                  
                  cout"Amount to be paid by the customer No."cust_num" is "bill"\n";
                  break;
                  
                  default:
                          cout"Invalid Entry";
           }
system("pause");
}

#include <iostream.h>
main()
{
int type;
int unit;
int customer_number;
int days,bill;
cout"1-----------Domectice User:\n";
cout"2-----------Commercial User:\n";
cout"Please Choose your choice From the Above menu:";
cin>> type;
switch(type)
{
case 1:
cout"Please enter the customer number:";
cin>>customer_number;
cout"Please enter unit consumed:";
cin>>unit;
cout"Please enter number of days:";
cin>>days;
if(unit<101)
{
bill=unit*5;
}
else if(unit>101&&unit<301)
{
bill=((unit*8)+100);
}
else if(unit>301&&unit<501)
{
bill=((unit*10)+230);
}
cout"Amount to be paid by the customer No."customer_number" is "bill"\n";
break;
case 2:
cout"Please enter the customer number:";
cin>>customer_number;
cout"Please enter unit consumed:";
cin>>unit;
cout"Please enter number of days:";
cin>>days;
bill = unit*15;
if(days>10)
{
bill=bill+200; 
}
cout"Amount to be paid by the customer No."customer_number" is "bill"\n";
break;
default:
cout"invalid entry\n";
}
system("pause");
}

HOw? ap ne prepare kiya hai program? 

app pehle program run kar k dekh lia karen phirpost kia karen. is mei cout k baad nahi hai or bhi bht se errors hain ye program galat hai

#include
int amount(char, int);
main()
{
int days;
int rent;
char model;
char name[20];
char carNo[10];
cout "Please provide cumstomer Name\t";
cin >> name;

cout "\nPlease provide Car Model Description" endl endl;
cout "\tEnter 'A' for Model 2009.\n";
cout "\tEnter 'B' for Model 2010.\n";
cout "\tEnter 'C' for Model 2011.\n";
cin >> model;

cout "\nplease provide following information:" endl endl;
cout "Car No:\t\t";
cin >> carNo;

cout "Number of days\t";
cin >> days;
cout endl endl;

switch(model)
{
case 'A':
case 'a':
cout "Customer Name:\t" name endl;
cout "Car Model:\t2009" endl;
cout "Car No:\t\t" carNo endl;
cout "Number of days:\t" days endl;
rent = amount(model, days);
cout "Your Rental Amaount is:\t" rent endl;
break;
case 'B':
case 'b':
cout "Customer Name:\t" name endl;
cout "Car Model:\t2010" endl;
cout "Car No:\t\t" carNo endl;
cout "Number of days:\t" days endl;
rent = amount(model, days);
cout "Your Rental Amaount is:\t" rent endl;
break;

case 'C':
case 'c':
cout "Customer Name:\t" name endl;
cout "Car Model:\t2011" endl;
cout "Car No:\t\t" carNo endl;
cout "Number of days:\t" days endl;
rent = amount(model, days);
cout "Your Rental Amaount is:\t" rent endl;
break;

default:
cout "please select only 2009, 2010, 2011 car models";

}
system("pause");
}

int amount(char m, int d){
if(m == 'A' || m == 'a')
return (5000 * d);

else if(m == 'B' || m == 'b')
return (8000 * d);

else if(m == 'C' || m == 'c')
return (10000 * d);
}

// Semester Fall 2012 (CS201) Assignment#2

#include <iostream>
#include <conio.h>
using namespace std;
int consumer_number; 
int domestic_user(); 
int commercial_user();

main()

system("cls");
int type;
cout" 1 . . . . . . . . Domestic User ";
cout"\n 2 . . . . . . . . Commercial User ";
cout"\n\n Please Choose Your Choice from the above menu : \t";
cin>>type;

switch(type) 
{
case 1:
cout" Ammount to be Paid by Consumer Number : "consumer_number" is Rs.\t"domestic_user()"\n";
break;
case 2:
cout" Ammount to be Paid by Consumer Number : "consumer_number" is Rs.\t"commercial_user()"\n";
break;
default:
cout"\nInvalid Choice . . . \n";

} //end of switch 
system("pause");
} //end of main


int domestic_user() 
{
int units;
int days;
int bill;
cout" Please enter your Consumer Number : ";
cin>>consumer_number;
cout" Please enter Units Consumed : ";
cin>>units;
cout" Please enter the Number of Days : ";
cin>>days;

if(days<=10)
{
if (units<=100) 
{
return bill=(units*5);
}

else if(units>100 && units<=300)

return bill=(units*8)+100;

else 

return bill=units*10+230;
}

else if(units<=100)
{
return bill=(units*5)+200;
}

else if(units>100 && units<=300)

return bill=(units*8)+100+200;

else

return bill=units*10+230+200;

}

int commercial_user() // User Function
{
int units;
int days;
int bill;
cout" Please enter your Consumer Number : ";
cin>>consumer_number;
cout" Please enter Units Consumed : ";
cin>>units;
cout" Please enter the Number of Days : ";
cin>>days;
if(days>10) // if construct

return bill=units*15+200;
}
else 
{
return bill=units*15;
}
}

#include <iostream.h>
int bill (int a);
int cbill (int a, int unit);
main()
{
cout "\nCS 201 Assignment # 2 Last Date 14-11-2012" endl;
cout "\n\n1------------DOMESTIC USER" endl;
cout "2------------COMMERCIAL USER";

int n;
int u,d;
int du;
int cu;

cout "\n\nChoose from above Menu as your Choice = ";
cin >> n;

switch (n)
{
case 1:
cout "\nEnter the /DOMESTIC USER/ Number = ";
cin >> n;

cout "\nPlease Enter Unit Consumed = ";
cin >> u;

cout "\nPlease Enter Days of Consumed = ";
cin >> d;

du = bill (u);
cout "\nThe total Bill of DOMESTIC USER '" n "' is = " du endl;

//******************************************************************************

case 2:
cout "\n\nEnter the /COMMERCIAL USER/ Nubmer = ";
cin >> n;

cout "\nPlease Enter Unit Consumed = ";
cin >> u;

cout "\nPlease Enter Days of Consumed = ";
cin >> d;

cu = cbill (d,u);
cout "\nThe total Bill of DOMESTIC USER '" n "' is = " cu endl;
break;

case 3:
cout "Invalid Choice";
break;

}
system("pause");

}
//******************************************************************************

int bill (int a)
{
int t;

if ((a > 0) && (a <= 100))
{
t = a * 5;
return (t);
}

if ((a > 100) && (a <= 300))
{
t = a * 8;
return (t);
}

if ((a > 300) && (a <= 500))
{
t = (a * 10) + 230;
return (t);
}
}
//******************************************************************************


int cbill (int a, int unit)
{
int t;
if (a <= 10)
{
t = unit * 15;
return (t);
}
if (a > 10)
{
t = (unit * 15) + 200;
return (t);
}
}

RSS

Latest Activity

+ !! "AS" !! replied to + !! "AS" !!'s discussion Jis Tarah ..
9 minutes ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Baat Karna ...
9 minutes ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Ghalti...
10 minutes ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Yaha Har Cheez ..
10 minutes ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Alfaaz Ki Nisbat..
11 minutes ago
Profile IconSafdar Mehmood, Shayaan, Hafiz muhammad sufyan and 28 more joined Virtual University of Pakistan
12 minutes ago
+ ! ! ! ! ! ! ReBeL replied to ٥ دن's discussion Gunahon ki gehrai
41 minutes ago
MUHAMMAD USMAN replied to MIT's discussion cs604 Quize#1 fall semester 2019 in the group CS604 Operating Systems
50 minutes ago
+ ! ! ! ! ! ! ReBeL replied to +¢αяєℓєѕѕ gιяℓ's discussion Iss tasvir ko Unwan Dein :-P
57 minutes ago
مخلص posted a discussion
1 hour ago
ambreen fatima and Muhammad Hamza Mehmood are now friends
1 hour ago
MIT added a discussion to the group CS604 Operating Systems
1 hour ago
sardarni liked + M.Tariq Malik's discussion MCM531 Community Journalism Assignment No 01 Fall 2019 Solution & Discussion Due Date: 22-11-2019
1 hour ago
sardarni joined + M.Tariq Malik's group
2 hours ago
blackeagle replied to + M.Tariq Malik's discussion EDU402 Curriculum Development Assignment No 01 Fall 2019 Solution & Discussion in the group EDU402 Curriculum Development
2 hours ago
sardarni joined + M.Tariq Malik's group
2 hours ago
sardarni joined + M.Tariq Malik's group
3 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
3 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
3 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" liked +¢αяєℓєѕѕ gιяℓ's discussion Shadi Ho Rhi Hai Alhamdulillah.......... (^__^)!
3 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service