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...


write a program on c(or)c++(or)java language i.e if i have 5
numbers like (10,24,3,9,15) i want to display highest number
from these numbers

Answers were Sorted based on User's Feedback



write a program on c(or)c++(or)java language i.e if i have 5 numbers like (10,24,3,9,15) i want to ..

Answer / bhavesh gharat

#includ <conio.h>
#include <stdio.h>

void main()
{
int a[]={10,24,3,9,15};

int temp=a[0];

for(int i=1;i<a.length;i++)
{
if(temp<a[i])
{
temp=a[i];
}
}
printf(" higest no="+temp);
}

Is This Answer Correct ?    4 Yes 1 No

write a program on c(or)c++(or)java language i.e if i have 5 numbers like (10,24,3,9,15) i want to ..

Answer / ashwek

/// Using C++

#include<iostream.h>
#include<conio.h>

int main(){
int arr[]={10,24,3,9,15};
int Max=arr[0];

for(int i=1; i<5; i++)
if(Max < arr[i]){
Max = arr[i];

cout<<"Higest number is = " <<Max;
return 0;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

Diffrence between 2.0,3.0,3.5,4.0. versions of .net?

0 Answers  


Why we need new operator in java at the time of object declaration and why not in c++?

1 Answers   Zensar,


why applet is introduced?

1 Answers  


how to stop execution of step 3 in a job mainframe

0 Answers  


I need to fetch all rows from the table based one field value in the table and later do a condition check if the condition is true I will have to move all the rows present in the data base to output file one else if the condition is not satisfied then move all the records of that field value into another file .Please let me know how to do that

0 Answers  


Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming

1 Answers  


I would like to know what is Intellimatch and some interview questions which could be asked related to Intellimatch.

3 Answers  


Which of the following are Java modifiers?

0 Answers  


Data structure used to impliment a menu:

0 Answers   Verifone,


What is Negative testing?

0 Answers  


can we allocate memory for interface? if no then why?

0 Answers  


Is anyone has done the ASP.NET MVC4 workshop course(2 days) from Peers Technologies. Let me know. I need to talk before joining ASP.NET MVC4 training at peers, Hyderabad.

0 Answers  


Categories