Find greatest number out of 10 number without using loop.

Answer Posted / dheeraj

#include<stdio.h>
#include<conio.h>
input(int a[]);
find(int []);
int i=0,a[10],j=0,max=0;
main()
{
clrscr();

printf("enter no");
input(a);
find(a);
printf("\nmax no is==%d",max);
}
input(int a[10])
{
i++;
scanf("%d",&a[i]);
if(i<10)
{
input(a);
}
}
find(int a[10])
{

if(j<10)
{
j++;

if(max<a[j])
{
max=a[j];
}
find(a);
}

}

Is This Answer Correct ?    9 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between a structure and a union.

775


Why doesnt this code work?

626


Can you mix old-style and new-style function syntax?

672


Is that possible to add pointers to each other?

909


When a c file is executed there are many files that are automatically opened what are they files?

600






Why we not create function inside function.

1763


How to get string length of given string in c?

619


What is function what are the types of function?

572


What is use of null pointer in c?

578


How many keywords (reserve words) are in c?

630


What is difference between structure and union in c programming?

579


How #define works?

633


Place the #include statement must be written in the program?

578


What is the use of typedef in c?

597


Are the variables argc and argv are always local to main?

583