DAY 2 ASSIGNMENT,ATTENDANCE AND QUIZ

 LINK FOR ATTENDANCE AND QUIZ

CLICK HERE



ASSIGNMENT FOR PRACTICE(NOT REQUIRED TO SUBMIT)

Write a program to print the difference of two numbers.
Write a program to check 'a' is greater than 'b' or less than 'b'
   Hint: use if statement.
Write another program to check which value is greater 'a', 'b' or 'c'.
   Hint: use else-if statement.
   (Take values of a, b, c as user inputs)
Write a program to check whether the age of the employee is between 20-60.
Write a program to solve the following expression:
      (a/b) + (c/d)
      The values of a, b, c and d are taken as input from the user.
      Use typecasting to perform real division.
Try the subtraction operator on your own.
Try replacing the addition operator with subtraction operator.
You should get the result as 3. 


Write a program to demonstrate the use of modulus operator.
Please note that Modulus operator finds the remainder of division.
eg. c = a % b; (a=5, b=2)
You should obtain the result as 1. 
Write a program that takes marks of three students as input.
Compare the marks to see which student has scored the highest.
Check also if two or more students have scored equal marks.
Write a program that takes two numbers as input from the user.
Check whether the two numbers are equal or not using NOT operator.
Hint: (a!=b)


Comments

Post a Comment