hi,
while learning from your site i have found that you didn't mention what will happen if i changed the value of variable y = 700
please update your program
Regards
Rishi
int x=50, y=70, z=90;
The program is not working.
We can use this logic
if(x > y){
if(x > z){
System.out.println("X is highest");
} else {
System.out.println("Z is highest");
}
} else{
if(y > c){
System.out.println("Y is highest");
} else {
System.out.println("C is highest");
}
}
int x=500, y=3000, z=4000;
i tried this value and did not get the answer. i think the coding needs a change.
********************
class largernumber{
public static void main(String[] args) {
int x=1000, y=200, z=3000;
if (x>y){
if (x>z){
System.out.println("x is greater");
}
else{
if(z>y){
System.out.println("z is greater");
}
}
}
else{
if (y>z){
System.out.println("y is greater");
}
else{
System.out.println("Z is greater");
}
}
}
}
***********
I m new to java programming and please bear with me and assist me incase i m wrong.
// Simple Logic
public class Exper
{
public static void main(String args[])
{
int a = 10;
int b = 3;
int c = 7;
if((a>b) && (a>c))
{
System.out.println("The Greatest Number Is A = " +a);
}
else if((b>a) && (b>c))
{
System.out.println("The Greatest Number Is B = " +b);
}
else if((c>a) && (c>b))
{
System.out.println("The Greatest Number Is B = " +c);
}
}
}
I need to enter 6 grades and print the largest of the 6. I have the 6 grades entered and stored in variables but cannot find a way to print the highest and smallest. Also I am not allowed used methods. Any help would be greatfully appreciataed.
Thank you.
same questionshruti June 26, 2011 at 4:58 PM
this is a long method how can we apply the tertiary(?:) operator on this ........
missing codeRishi November 17, 2011 at 12:25 PM
hi, while learning from your site i have found that you didn't mention what will happen if i changed the value of variable y = 700 please update your program Regards Rishi
computer sciencebalaji December 26, 2011 at 3:08 PM
send me java porgramming software free dowloand in my emailid pls sendme
javasivaprasad January 16, 2012 at 5:50 PM
awesome
javashiva February 15, 2012 at 10:27 PM
i wana help from u to learn java
javaajit kumar karan February 27, 2012 at 7:53 PM
this side is very helpfull for me and it is the best side for question answer
Logic changeimperfect April 3, 2012 at 10:38 AM
int x=50, y=70, z=90; The program is not working. We can use this logic if(x > y){ if(x > z){ System.out.println("X is highest"); } else { System.out.println("Z is highest"); } } else{ if(y > c){ System.out.println("Y is highest"); } else { System.out.println("C is highest"); } }
coding confusionSantosh Shetty May 14, 2012 at 6:41 PM
int x=500, y=3000, z=4000; i tried this value and did not get the answer. i think the coding needs a change. ******************** class largernumber{ public static void main(String[] args) { int x=1000, y=200, z=3000; if (x>y){ if (x>z){ System.out.println("x is greater"); } else{ if(z>y){ System.out.println("z is greater"); } } } else{ if (y>z){ System.out.println("y is greater"); } else{ System.out.println("Z is greater"); } } } } *********** I m new to java programming and please bear with me and assist me incase i m wrong.
JavaOmi October 1, 2012 at 11:43 PM
Insert X is lowest value, then Y is greater than X and Z is Greater Than Y.. Like x=100,y=500,c=3000 no output Programm is wrong :o
javaOmi October 1, 2012 at 11:44 PM
// Simple Logic public class Exper { public static void main(String args[]) { int a = 10; int b = 3; int c = 7; if((a>b) && (a>c)) { System.out.println("The Greatest Number Is A = " +a); } else if((b>a) && (b>c)) { System.out.println("The Greatest Number Is B = " +b); } else if((c>a) && (c>b)) { System.out.println("The Greatest Number Is B = " +c); } } }
assignmentsmartie92 November 1, 2012 at 7:51 PM
I need to enter 6 grades and print the largest of the 6. I have the 6 grades entered and stored in variables but cannot find a way to print the highest and smallest. Also I am not allowed used methods. Any help would be greatfully appreciataed. Thank you.
Post your Comment