does somone knows how to creatye a program that well accept five members and display the lowest number

Try not to post here dude, Its a solved thread

You can remove the define and replace the word NUMBERS with 5 through out program to make it purely for evaluating lowest of 5
Else, you can leave it as it is and run. Still the same thing :D

``````// Program that finds lowest of N numbers
#define NUMBERS 5
#include<stdio.h>
int main()
{
int i,temp,a[NUMBERS];
printf("\nEnter the numbers: ");
for(i=0;i<NUMBERS;i++)
{
scanf("%d",&a[i]);
if(a[i]<temp)
temp=a[i];
}
printf("\nLowest is %d",temp);
return 0;
}``````

really true.:yawn:

You can remove the define and replace the word NUMBERS with 5 through out program to make it purely for evaluating lowest of 5

:icon_rolleyes:
Yes you can. But going from a useful, good coding practice that makes further development easy to hardcoded, poor coding practice that makes further development hard does not sound like a good idea. Any reason why you would recommend such a move?

does somone knows how to creatye a program that well accept five members and display the lowest number

``````#include <stdio.h>
#include <conio.h>
void main()
{
int i;
int num[5],min;
printf("Need Input of any 5 numbers");
for(i=0;i<5;i++)
{
scanf("%d",&num[i]);
}
min=num[0];
for(i=0;i<5;i++)
{
if(min<num[i])
{
min=num[i];
}
}
printf("Lowest Number Detected as :- %d",min);
getch();
}``````
commented: We do NOT write programs for people. We frown on cheating. Please don't do it again. -4

That depends on what the program does:

If it's running the auto pilot of the jet I'm on, I'd like it to work exactly correctly, thank you. ;)

Even when safety isn't an issue, just imagine the waste from having printing software that goofs up 50000 copies of a book that is being printed up, or metal that is being cut and formed, etc.

You might see it as efficient, but as an employer, I'd see it most efficient to show such a programmer, their pink slip, and the door out. Having a reputation as a poor quality software house, is not good for your business.

Dear,

It was just an example which may could help beginners. Creating confusion blocks and making out of track to those who might have not even known to it...

It's not at all makes sense for pointing out an issue on such posts. It seems to be restless when you never understands Layman requirement which may force you to loose your's reputation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.