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 page hit in operating system?
Difference between HTML and DHTML?
3. . Explain the Cache memory? What is the advantage of a processor having more cache memory?
Full from of MP3?
What is the difference b/w Object base and object oriented programming?
Binary tree?
hi all, i need ur help in preparing a sql which performs scd2, i mean i have a scd2 mapping i need a sql which can give me same result as scd2 mapping, SRC table: cust_no, loc 01 abc 02 xyz TGT table: pm_ky cust_no loc current_flag 1 01 abc Y 2 02 xyz Y cust 1 has changed his loc to xyz then it loads into TGT table as below, pm_ky cust_no loc current_flag 1 01 abc N 2 02 xyz Y 3 01 xyz Y i need sql to get the above result, hope got me question, Any suggestion will be appreciate.. thanks, Vinod
what is the main usage of an abstract keyword?please follow the program class A { void display() { System.out.println("hai"); } void print() { } } class B extends A { void print() { System.out.println("Hello"); } } In this program i was gives the implementation of print() according to my requirements in subclass.And there is no definition in superclass then why we can use abstract keyword before a method that i want to gives definition in other classes,is any mistakes in the above usage of method?
can we convert .class file to dll file
1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?
what is delegate and delegation model give the real live example on delegate model
Describe the following: (i) DNS (ii) Name Resolution (iii) Subnet Masking (iv) Urgent Pointer