Город МОСКОВСКИЙ
00:06:27

Conditional Operator in java programming 1

Аватар
Java Кодировка
Просмотры:
22
Дата загрузки:
05.12.2023 07:43
Длительность:
00:06:27
Категория:
Обучение

Описание

By this tutorial you will learn the working of conditional operator or ternary operator. Operator which require three operand is known as ternary operator.

#programmingera #computerskills #java #javaprogramming #javatutorial #javatutorialforbeginners #learnjava #javafullcourse #javaforbeginners #javaonlinetraining #javaonlinetutorial #javaonlineclasses #corejava
#operator #conditionaloperator #ternaryoperator

Exercise
1. Write a program to enter selling price and cost price of an item and check whether seller has made profit or loss.
2. Write a program to enter a number and check whether number is even or odd. Number divisible by 2 is even otherwise odd.
3. Write a program to enter a number and check whether number is positive or negative. Number greater than 0 is positive.
4. Write a program to enter a year and check whether it is leap year or not. Year divisible by 4 is leap year.
5. Write a program to print commission of an employee, If annual salary of an employee is more than 1 lack then his commission will be 10% else commission will be 5% of annual salary.

Operator

Conditional Operator in java programming 1
https://youtu.be/2xFmb8yiYVg

Conditional Operator in Java programming 2
https://youtu.be/iluKj-Z5bGQ

Nested Conditional Operator in java programming 3
https://youtu.be/HsXGe1ZfawY

Рекомендуемые видео