STUDENTS 3K

  • Home
  • Students+
    • Engineering Students
    • Education Loan
    • Study Abroad Guide
    • Projects Download
  • Freshers
    • Aptitude Q & A
    • Placement Papers
    • Verbal Ability
    • Interview Questions
    • IT Company Details
    • Job Updates
  • Study Resources
    • Career Guidance
    • LAB Programs
      • C Programs
      • CPP Programs [C++]
      • Java Programs
    • Question Papers
    • Learn English
    • Notice Board
  • More –>>
    • Love calculator
You are here: Home / Important Programs / Greatest of three numbers using conditional operator in C program

Greatest of three numbers using conditional operator in C program

C program for finding Greatest of 3 numbers using conditional operator. The questions may be asked for this C program is, write a c program to find greatest of 3 numbers using conditional operator & write a program for biggest of 3 numbers in C using conditional operator. It is an useful C program for beginners.

  • Mini & Major Projects free download
  • Aptitude Questions & Answers

Largest of 3 numbers using conditional operator

Find biggest of three numbers using conditional operator in C. It is used to find the biggest number by using conditional operator like and, or, not and not by using conditional statements.

[Read: Software Company Details] & [Love % Calculator]

C PROGRAM:

/* Title: Greatest Numbers
Author: Vinoth Selvaraj
© http://students3k.com
*/
//Header files
# include <stdio.h>
# include <conio.h>

void main()
{
	//Program variables
	int value1,value2,value3,b;

	clrscr(); //Function used to clear previous output

	printf("Enter first value : "); //Display function
	scanf("%d",&value1); //Getting input value

	printf("Enter second value : ");
	scanf("%d",&value2);

	printf("Enter third value : ");
	scanf("%d",&value3);

	b = ((value1>value2)&&(value1>value3)?value1:(value2>value3?value2:value3));
	printf("greatest number is %d",b);/* Statement with conditional operator */

	getch();
}

Filed Under: Important Programs Tagged With: C, LAB, Programs





Random Materials :

  • Data Mining and Data Warehousing
  • Difference Between Class and Primitive Types
  • Database Roles in SQL
  • CASE Expression in SQL
  • Concurrent Update Problem

Follow Us on Facebook

Advertisement

Company Profile

  • About Students3k
  • Contact Us
  • Earn Money Online
  • Website Archive Page
  • Privacy Policy
  • Disclaimer

Categories

  • Important Programs
  • Study Abroad
  • IT Companies
  • Career Guidance for Students
  • Teachers
  • Verbal Analogies

We Are Social

  • Facebook Fans
  • Twitter Follow
  • Google Plus
  • Pinterest Page

© Copyright 2012 - 2016 Students3k.com · All Rights Reserved · Designed By Benefits

Show