









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various tasks performed during a C++ programming lab. The tasks include entering numbers to find their value using else if conditions, checking if characters are vowels, determining if the sum of two numbers is positive or negative, using logical operators, finding maximum and minimum numbers, and calculating even or odd numbers. Additionally, tasks related to inputting grades and calculating corresponding numbers and grades are included.
Typology: Cheat Sheet
1 / 16
This page cannot be seen from the preview
Don't miss anything!










number by using series of else if condition checking. Each if else condition check for number for a particular number and if it is TRUE then all other checking ( else if ) are omitted. Getting the number by using input mark in C programming
character data type is char. Characters typically requires 1 byte of memory space and ranges from 128 to 127 or 0 to 255. In this task we write a char variable and in this program we stored the more than one character variable so let’s do the perform program: We have performed the task of Ask the user to enter an alphabet. In output, display that whether the given alphabet is vowel or not. It is done by using if-else conditional statements.
operands is true if and only if all of its operands are true. It is typically used with Boolean (logical) values. When it is, it returns a Boolean value. However, the && operator actually returns the value of one of the specified operands, so if this operator is used with non-Boolean values, it will return a non-Boolean value && Logical and: Returns true if both statements are true || Logical or: Returns true if one of the statements is true ! Logical not: Reverse the result, returns false if the result is true We have to take three inputs from user and find maximum number
Output:
Task 2: Input:
grade by using series of else if condition checking. Each if else condition check for mark for a particular grade and if it is TRUE then all other checking (if) are omitted.
st year marks to a variable and take marks of 6 books from user, then sum all these marks and you get grade and percentage according to your marks.
So we have performed all the tasks successfully and also succeeded in fulfilling completion of the required tasks assigned by the instructor