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
How many types of operator or there in c?
Do variables need to be initialized?
What are the application of c?
Is fortran faster than c?
What is the advantage of c?
What is the difference between formatted&unformatted i/o functions?
What is the default value of local and global variables in c?
Write a program to reverse a given number in c?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What is break statement?
What are derived data types in c?
What is meant by preprocessor in c?
How do I determine whether a character is numeric, alphabetic, and so on?
Explain how can I convert a number to a string?
Explain what is a stream?