C PROGRAMMING

Friday, 26 June 2015



Aim – WAP To Compare Two Numbers And Print The Largest Number Without Using if

Code-



#include<stdio.h>

#include<conio.h>

void main ()

{

int a, b, c;

clrscr ();

printf ("Enter The Two Numbers Respectively: ");

scanf ("%d%d", &a, &b);

c=(a>b)?a:b;

printf ("The Largest Among The Two Number Is : %d", c);

getch ();

}

OUTPUT

Enter The Two Numbers Respectively : 26 10

The Largest Among Two Number Is : 26















Posted by sonu at 22:05
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2015 (15)
    • ▼  June (15)
      • Aim - WAP To Find Smallest and Largest Among Four...
      • Aim – WAP To Reverse a 5-digit Number and Check ...
      • Aim – WAP To Find The First Day of the YearCode ...
      • Aim- WAP To Check Whether Entered Number Is Odd...
      • Aim – WAP To Compare Two Numbers And Print The ...
      • Aim - WAP To Reverse Four Digit Number Code- #in...
      • Aim - Calculate The Sum & Percentage Of Marks Ob...
      • wap To Print Value One less than & One More Than ...
      • -     To print ASCII value of Entered Character ...
      • 5.Aim - WAP To Swap Two Numbers Using Third Vari...
      • 4.Aim - WAP To Swap Two Numbers Without Using Th...
      • 3.Aim -WAP To Perform Various Arithmetic operati...
      • 2.Aim -  WAP To Convert Celsius Into Farenheit ...
      •  1 Programming: Aim -  Wap to print hello. ...
      •   
Simple theme. Powered by Blogger.