Tuesday, 2024-12-24, 9:14 PM
ebooks Programming Computer Science
Welcome
Guest
|
RSS
Main
|
Registration
|
Login
Site menu
Home page
File Catalog
Publisher
Write your Blog here
Forum
Photo Albums
Guestbook
Contact Us
Data Structure & Alg...
Computer Science
Operating System
Programming Books
Religious Books
Web Developing
Hacking Tutorial
Assembly Programming
Game Programming
Search Engine Optimi...
Programming Links
বাংলা ব্লগ
Photoshop
Programming Links
Apps Development
Section categories
My articles
[23]
Main
»
Articles
»
My articles
How to find out smallest number among 3 numbers without conditional statement
#include<stdio.h>
int smallest(int a,int b,int c)
{
int p=0;
while(a && b && c)
{
a--;b--;c--;p++;
}
return p;
}
void main()
{
int a=3,b=5,c=9;
printf("The smallest number among 3 numbers is %d\n",smallest(a,b,c));
}
1
2
3
4
5
Category:
My articles
| Added by:
Sumrat
(2012-11-30)
Views:
9453
| Rating:
0.0
/
0
Total comments:
0
Name *:
Email *:
Code *:
Our poll
Rate my site
Excellent
Good
Not bad
Bad
Awful
Results
|
Polls archive
Total of answers:
164
Statistics
Total online:
2
Guests:
2
Users:
0
Login form