how to find out the maximum number out of the three inputs.

Answer Posted / hsandeep007

Hi Angads,

here is the code that need to implement.
I used java..

class largeNum{
public static void main(String args[])
{
int i,j,k;

i = Inter.parseInt(args[0]);
j = Inter.parseInt(args[1]);
k = Inter.parseInt(args[2]);



if (i>j && i>k)
{
system.out.print("i is max" + i);
}
else if(j>i && j>k)
{
system.out.print("j is max" + j);
}
else if(k>i && k>j)
{
system.out.print("k is max" + k);
}
}
}

Is This Answer Correct ?    32 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2067


write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation

2407


write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150

3269


Code for Easily Using Hash Table?

2391


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

2010






Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

552


Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.

2152


how to write a program that opens a file and display in reverse order?

2568


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

2748


Code for Two Classes for Doing Gzip in Memory?

2814


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2220


write a program using virtual function to find the transposing of a square matrix?

2845


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

4579


develop a program to calculate and print body mass index for 200 employees

2216


how to diplay a external image of output on winxp by using c & c++,

2938