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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

2624


In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?

2036


Write code to read the records from a file and load any array of size 99?make sure that you take care of all the error conditions?

1855


What is %Type,%Rowtype?

2034


Definition of Singleton Class? what is the Purpose of it? what is the advantage?

1871


In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.

2078


What are the Short cut Keys of Tally ERP?

2053


which worker is involved in all the phases of SDLC?

1938


in teradata level primary in table level allows duplicates why?

1869


why we need to take u?

1897


How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?

1734


how can we implement locks in plsql?

2073


can we extend a class having only one parameterised constructor.Suggest the process to do it.

2291


V2 SOLUTIONS APTI paper is very easy there are 3 sections 1'st is quant problem on age train traveling speed is given length of train is given we have to find out length of bridge then prob on calender one date is given on Friday hv to find out day of othe date ans is Friday then there was 1 prob on percentage which was very easy ans was 21340 then 2’nd section was english grammer had has been being like that hv to fill in the blanks was very wasy then last section was find relative words there was five Q 1 pant ANS:-breath 2inquire ans :- ask And 3 more out of that 1 ‘s ans was:- body 4 And others ans was :-through THEN THEY HAVE GD There was three topics 1 should we allow india’s talent to go to abrod 2 protest against seperate state is justify 3 inturuption of politics in cricket Thats all guys i cleared both the rounds now preparing 4 interview best of luck

2006


when we use mantis? how learn mantis?

1932