Social Icons

Pages

12/05/2012

C++ Lectures

Problem Write a program a program that accepts category as user input, determines if they are a leap division, and demo an appropriate message that tells the user if the entered year is or non a leap year. Algorithm 1. enter year(y). 2. if (y%4==0) video display a leap year else display not leap year. 3. end. Flow Chart Source Code # allow<iostream.h> #include<conio.h> #include<stdio.h> main() { clrscr(); int yr,m; char q; cout<<enter year\t; cin>>yr; if (yr%4==0)cout<<\nyear <<yr<< is a leap year.; else cout<<\nyear <<yr<< is not a leap year.; getch(); } PROBLEM Write a program that accepts the year and weights of an gondola and determines and displays the weight strain and registration for the car. ALGORITHM 1. input year, weight (w) 2. if year <=1970 go to step 3 else if year<=1979 go to step 4 else if w<3500 display disunite 7 salary $19.50 go to step 5 else display social class 8 tip off $52.50 go to step 5. 3. if w<2700 display class 1 fee $16.50 go to step 5 else if w<=3800 display class 2 fee 25.50 go to step 5 else display class 3 fee $46.50 go to step 5. 4. if w<2700 display class 4 fee $27.00 else if w<=3800 display class 5 fee 30.
Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.
50 else display class 6 fee $52.50. 5. end FLOW CHART SOURCE CODE #include<iostream.h> #include<conio.h> main() { clrscr(); int yr, w; cout<<role model year\t:\t; cin>>yr; if (yr<=1970){cout<<weight\t\t :\t; cin>>w;cout<<\n\nModel Year\t Weight \tWeight Class \tRegistration Fee; { if (w<2700) cout<<\n\n <<yr<<\t\t<<w<< lbs\t 1\t<<\t $16.50 ; else if ((w>=2700)&&(w<=3800)) cout<<\n\n <<yr<<\t\t<<w<< lbs\t 2\t<<\t $12.50; else cout<<\n\n... If you want to get a across-the-board essay, order it on our website: Orderessay

Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.