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
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 |
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 |
what is web configuration file
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
What is web.configuration? how is it work? & wht is use this?
In Java what is the difference between following two statements ? int a[],b; int []a,b;
What is the difference beween joblib and steplib statements
In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?
what are resources in case of Threads
in teradata level primary in table level allows duplicates why?
what are other resources are needed for this mantis?
in cobol,wat is the difference in using 'set index in occurs clause' ....and 'occurs depending-on clause'
details description on this mantis? who is founder of this mantis?
pleasew define carrier scope in abap (sap).