SlideShare a Scribd company logo
1 of 1
PROGRAMMING USING C++
ICT 120
APREKU ANTHONY K.
ID: 03140237
#include <iostream>
using namespace std;
1.
2. int main()
3. {
4. int cost;
5.
6. cout << "calculate the costof membershipn";
7.
8. cin>> cost;
9.
10. if (cost>= 30.00 && cost<= 39.00 )
11.
12. cout<< "BronzeMembershipn";
13.
14. else if ( cost >= 40.00 && cost<= 49)
15.
16. cout<<"Silver Membershipn";
17.
18. else if ( cost >= 50.00 && cost<= 59.00)
19.
20. cout<< "Gold Membershipn";
21.
22. else if (cost <= 0 || cost>= 50)
23.
24. cout<<" Membership can not be foundn";
25.
26. return 0;
27.}

More Related Content

Viewers also liked

Lecture 2 variables
Lecture 2 variablesLecture 2 variables
Lecture 2 variablesTony Apreku
 
Two Step Equations Jeopardy
Two Step Equations JeopardyTwo Step Equations Jeopardy
Two Step Equations Jeopardykwest
 
Time series-mining-slides
Time series-mining-slidesTime series-mining-slides
Time series-mining-slidesYanchang Zhao
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingHaris Bin Zahid
 
Ruby Programming Language - Introduction
Ruby Programming Language - IntroductionRuby Programming Language - Introduction
Ruby Programming Language - IntroductionKwangshin Oh
 
Ruby Basics
Ruby BasicsRuby Basics
Ruby BasicsSHC
 
0. Course Introduction
0. Course Introduction0. Course Introduction
0. Course IntroductionIntro C# Book
 
20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental Principles20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental PrinciplesIntro C# Book
 

Viewers also liked (10)

UML constructs
UML constructs UML constructs
UML constructs
 
Lecture 2 variables
Lecture 2 variablesLecture 2 variables
Lecture 2 variables
 
C++ for beginners
C++ for beginnersC++ for beginners
C++ for beginners
 
Two Step Equations Jeopardy
Two Step Equations JeopardyTwo Step Equations Jeopardy
Two Step Equations Jeopardy
 
Time series-mining-slides
Time series-mining-slidesTime series-mining-slides
Time series-mining-slides
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Ruby Programming Language - Introduction
Ruby Programming Language - IntroductionRuby Programming Language - Introduction
Ruby Programming Language - Introduction
 
Ruby Basics
Ruby BasicsRuby Basics
Ruby Basics
 
0. Course Introduction
0. Course Introduction0. Course Introduction
0. Course Introduction
 
20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental Principles20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental Principles
 

C++ program to determine membership level based on cost

  • 1. PROGRAMMING USING C++ ICT 120 APREKU ANTHONY K. ID: 03140237 #include <iostream> using namespace std; 1. 2. int main() 3. { 4. int cost; 5. 6. cout << "calculate the costof membershipn"; 7. 8. cin>> cost; 9. 10. if (cost>= 30.00 && cost<= 39.00 ) 11. 12. cout<< "BronzeMembershipn"; 13. 14. else if ( cost >= 40.00 && cost<= 49) 15. 16. cout<<"Silver Membershipn"; 17. 18. else if ( cost >= 50.00 && cost<= 59.00) 19. 20. cout<< "Gold Membershipn"; 21. 22. else if (cost <= 0 || cost>= 50) 23. 24. cout<<" Membership can not be foundn"; 25. 26. return 0; 27.}