Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Find greatest number out of 10 number without using loop.

Answer Posted / satya

#include<stdio.h>
void main()
{
static int big=0,a=0,cnt=0;
printf("enter number");
scanf("%d",&a);
if(a>big)
big=a;

if(cnt<=10)
{
cnt++
main();
}
printf("largest number amongest 10 numbers is :%d",big);
}

Is This Answer Correct ?    4 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is best book for data structures in c?

1035


What is the use of #include in c?

1031


What does %2f mean in c?

1157


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1045


Explain 'bus error'?

1008


What is the purpose of void pointer?

983


Why isnt there a numbered, multi-level break statement to break out

992


What is the value of uninitialized variable in c?

974


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1093


What’s a signal? Explain what do I use signals for?

1050


Explain what are multibyte characters?

1108


When is a void pointer used?

1188


What does the characters “r” and “w” mean when writing programs that will make use of files?

1419


In a switch statement, what will happen if a break statement is omitted?

1005


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

1964