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
What is a nested formula?
What are the preprocessor categories?
When should structures be passed by values or by references?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
What is the difference between array and linked list in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Can static variables be declared in a header file?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What is hashing in c?
Why do we use & in c?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
What are local static variables?
Write a program to print factorial of given number without using recursion?
How to declare pointer variables?