MSK Technologies

Home
Practice Programs
Java Programs Python Programs Java Quiz
Pages
Python Java Material PLSQL Material
Search A Job

Write a C-program to print max number using ternary operator?

  1. Home
  2. C Language Programs

Write a C-program to print max number using ternary operator?

Write a C-program to print max number using ternary operator


#include <stdio.h>
int main() {
    int x,y;
    printf("Enter x,y values");
    scanf("%d%d",&x,&y);
    x>y ? printf("x is max Number") : printf("y is max Number");
    
    return 0;
}
                                            

Output:

Enter x,y values 10 20
y is max Number

Enter x,y values 20 10
x is max Number




More Programs


24 . Write a C-program to print ODD or Even Number using if else condition
25 . Write a C-program to print max number using if else condition
26 . Write a C-program to check the given number is valid or invalid(value must divisible by 2 and 3)
27 . Write a C-program to check the given number is valid or invalid(value must divisible by 2 and 3 not 4)
28 . Write a C-program to check the given number is valid or invalid(value must divisible by 2 and 3 not 4 using 2 conditions)
29 . Write a C-program to check the given number is valid or invalid(value must between 20 and 30)
30 . Write a C-program to check the given character is vowel or consonant
31 . Write a C-program to check the given character is small letter or not
32 . Write a C-program to check the given character is capital letter or not
33 . Write a C-program to check the given character is number or not
34 . Write a C-program to check the given character is symbol letter or not



Apply For The Job

Apply For Job

Java Material

Python Material

PLSQL Material

.Net Material

Java Practice Programs

400 Java Programs

Java Practice Programs

Write a java Program to Print given number in words

Write a Java Program to Find the sum of the digits of a number

Write a Java program and compute the sum of the digits of an integer

Write a Java program to add two numbers without using any arithmetic operators

Write a Java program to print the sum of two numbers

Python Practice Programs

Write a python program to Checking if a File Exists or Not ?

Write a python program to find absolute value of a number in the list

Write a Python Program to Print the Fibonacci sequence.

Write a python program to convert uppercase strings and we want to convert them into lowercase strings and remove duplicates ?

Write a python program to check two strings are Anagram or not

Java Quiz

Java Quiz - 1

Java Quiz - 21

Java Quiz - 3

Java Quiz - 20

Java Quiz - 2

Courses
Java Python PLSQL .Net ADO.Net About Us
Quick Links
Daily Use English Sentences Daily General Knowledge General Knowledge Latest Update Inventions and Inventors జనరల్ నాలెడ్జ్ General Knowledge Spoken English Spoken Hindi GK Hindi Telugu Facts Unknown Facts Psychology Facts Motivation Quotes విటమిన్ - సి,డి,ఇ,కె Android
Spiritual
రాధాకృష్ణ భగవద్గీత Motivation Quotes Slokas Talapatra Nidhi ఆధ్యాత్మిక భక్తి ప్రపంచం Sadhguru Sai Motivation Quotes గౌతమ బుద్ధుడు Bhagavad Gita Quotes
Newsletter

Dolor amet sit justo amet elitr clita ipsum elitr est.

© sateeshm, All Right Reserved. Designed By sateeshm
Home Help FQAs