Code With Margaish
Powered by
Blogger
.
About us
Privacy Policy
Disclaimer
Contact Us
Home
Showing posts with label
Chapter 2
.
Show all posts
Showing posts with label
Chapter 2
.
Show all posts
Tuesday, 21 July 2020
Chapter 2
18. 2.24 (Odd or Even) Write a program that reads an integer and determines and prints whether it’s odd or even. [Hint: Use the remainder operator (%). An even number is a multiple of two. Any multiple of 2 leaves a remainder of zero when divided by 2.]
by :
Abdul Rehman Margaish
July 21, 2020
0
18. 2.24 (Odd or Even) Write a program that reads an integer and determines and prints whether it’s odd or even. [Hint: Use the remainder op...
Read More
Chapter 2
17. 2.23 (Largest and Smallest Integers) Write a program that reads in five integers and determines and prints the largest and the smallest integers in the group. Use only the programming techniques you learned in this chapter.
by :
Abdul Rehman Margaish
July 21, 2020
0
17. 2.23 (Largest and Smallest Integers) Write a program that reads in five integers and determines and prints the largest and the smallest ...
Read More
Chapter 2
15. 2.21 (Displaying Shapes with Asterisks) Write a program that prints a box, an oval, an arrow and a diamond
by :
Abdul Rehman Margaish
July 21, 2020
0
15. 2.21 (Displaying Shapes with Asterisks) Write a program that prints a box, an oval, an arrow and a diamond #include <iostream> u...
Read More
Chapter 2
14. 2.20 (Diameter, Circumference and Area of a Circle) Write a program that reads in the radius of a circle as an integer and prints the circle’s diameter, circumference and area. Use the constant value 3.14159 for Ï€. Do all calculations in output statements. [Note: In this chapter, we’ve discussed only integer constants and variables. In Chapter 4 we discuss floating-point numbers, i.e., values that have decimal points.]
by :
Abdul Rehman Margaish
July 21, 2020
0
14. 2.20 (Diameter, Circumference and Area of a Circle) Write a program that reads in the radius of a circle as an integer and prints the ci...
Read More
Chapter 2
13. 2.19 (Arithmetic, Smallest and Largest) Write a program that inputs three integers from the keyboard and prints the sum, average, product, smallest and largest of these numbers
by :
Abdul Rehman Margaish
July 21, 2020
0
13. 2.19 (Arithmetic, Smallest and Largest) Write a program that inputs three integers from the keyboard and prints the sum, average, produc...
Read More
Chapter 2
12. 2.18 (Comparing Integers) Write a program that asks the user to enter two integers, obtains the numbers from the user, then prints the larger number followed by the words "is larger." If the numbers are equal, print the message "These numbers are equal."
by :
Abdul Rehman Margaish
July 21, 2020
0
12. 2.18 (Comparing Integers) Write a program that asks the user to enter two integers, obtains the numbers from the user, then prints the l...
Read More
Chapter 2
by :
Abdul Rehman Margaish
July 21, 2020
0
2.17 (Printing) Write a program that prints the numbers 1 to 4 on the same line with each pair of adjacent numbers separated by one space. ...
Read More
Chapter 2
10. 2.16 (Arithmetic) Write a program that asks the user to enter two numbers, obtains the two numbers from the user and prints the sum, product, difference, and quotient of the two numbers.
by :
Abdul Rehman Margaish
July 21, 2020
0
10. 2.16 (Arithmetic) Write a program that asks the user to enter two numbers, obtains the two numbers from the user and prints the sum, pro...
Read More
Older Posts
Home
Subscribe to:
Posts (Atom)