University of Babylon College of Information Technology Department of Information Security Programing Fundamentals C++, First Stage Assignment (2) / Due Date March 1,2021: 12pm Q1. Write a program to read one mark of a student from keyboard and check whether the student is pass or fail, then print "pass" if the mark is greater than or equal to 50 and print "fail" if the mark is less than 50. Q2. Write a program to read three numbers from keyboard and find out the maximum out of these three numbers (using nested if-else). Q3. Write a program to read marks from keyboard and your program should display equivalent grade cording to the following table. (using if-else if leader). Marks Grade 100 - 80 Distinction 60 - 79 First Class 35 - 59 0- 34 Second Class Fail Q4. Write a program to read a number in the range from 1 to 7 and accordingly it should display MONDAY to SUNDAY (using if-else-if leader). as. Write a program to read number for keyboard and check whether the given number is positive, negative or zero. Q6. Write a program to find out given year whether it is leap year or not. A given year is a leap year if it is satisfying the following condition. (GivenYear % 4 == 0 AND Givenyear%100 I= 0) OR (GivenYear % 400 == 0) Otherwise "it is not leap year".

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
University of Babylon
College of Information Technology
Department of Information Security
Programing Fundamentals
C++, First Stage
Assignment (2) / Due Date March 1,2021: 12pm
Q1. Write a program to read one mark of a student from keyboard and check
whether the student is pass or fail, then print "pass" if the mark is greater than
or equal to 50 and print "fail" if the mark is less than 50.
Q2. Write a program to read three numbers from keyboard and find out the
maximum out of these three numbers (using nested if-else).
Q3. Write a program to read marks from keyboard
display equivalent grade cording to the following table. (using if-else if leader).
Iyour program should
Grade
Distinction
Marks
100 - 80
60 - 79
First Class
35 - 59
Second Class
0- 34
Fail
Q4. Write a program to read a number in the range from 1 to 7 and accordingly
it should display MONDAY to SUNDAY (using if-else-if leader).
Q5. Write a program to read number for keyboard and check whether the given
number is positive, negative or zero.
Q6. Write a program to find out given year whether it is leap year or not. A given
year is a leap year if it is satisfying the following condition.
(GivenYear % 4 == 0 AND Givenyear%100 != 0) OR (GivenYear % 400 == 0)
Otherwise "it is not leap year".
Dr. Hasanein Alharbi
Page 1 of 1
Transcribed Image Text:University of Babylon College of Information Technology Department of Information Security Programing Fundamentals C++, First Stage Assignment (2) / Due Date March 1,2021: 12pm Q1. Write a program to read one mark of a student from keyboard and check whether the student is pass or fail, then print "pass" if the mark is greater than or equal to 50 and print "fail" if the mark is less than 50. Q2. Write a program to read three numbers from keyboard and find out the maximum out of these three numbers (using nested if-else). Q3. Write a program to read marks from keyboard display equivalent grade cording to the following table. (using if-else if leader). Iyour program should Grade Distinction Marks 100 - 80 60 - 79 First Class 35 - 59 Second Class 0- 34 Fail Q4. Write a program to read a number in the range from 1 to 7 and accordingly it should display MONDAY to SUNDAY (using if-else-if leader). Q5. Write a program to read number for keyboard and check whether the given number is positive, negative or zero. Q6. Write a program to find out given year whether it is leap year or not. A given year is a leap year if it is satisfying the following condition. (GivenYear % 4 == 0 AND Givenyear%100 != 0) OR (GivenYear % 400 == 0) Otherwise "it is not leap year". Dr. Hasanein Alharbi Page 1 of 1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 14 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education