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
Differentiate between a structure and a union.
Why doesnt this code work?
Can you mix old-style and new-style function syntax?
Is that possible to add pointers to each other?
When a c file is executed there are many files that are automatically opened what are they files?
Why we not create function inside function.
How to get string length of given string in c?
What is function what are the types of function?
What is use of null pointer in c?
How many keywords (reserve words) are in c?
What is difference between structure and union in c programming?
How #define works?
Place the #include statement must be written in the program?
What is the use of typedef in c?
Are the variables argc and argv are always local to main?