answersLogoWhite

0


Best Answer

//i hope its something like this you want

import java.util.*;

public class Count

{

public static void main(String args[])

{

double numbers;

Scanner scan;

int counter;

numbers=0;

scan=new Scanner(System.in);

for(counter=1; counter<=10; counter++)

{

System.out.println("Please enter numbers");

numbers=scan.nextDouble();

{

System.out.println("The number is "+numbers++);

}

}

}

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

#include
#include
int main()
{int a[10];
printf("enter 10 numbers:\n");
for(int i=0;i<=9;i++)
{printf("enter %d number\n",i+1);
scanf("%d",&a[i]);
}
printf("NUMBER SQUARE\n");
for(int j=0;j<=9;j++)
{printf("%d %d\n",a[j],(a[j]*a[j]));
}
getch();
return 0;
}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

I would use an array here, since this can easily be extended to more than 3 numbers. Something like this (assuming you already created the array):

maxValue = myArray[1];
for (int i = 1; i < myArray.length(); i++)
if (myArray[i] > maxValue)
maxValue = myArray[i]

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

CLS

PRINT "PROGRAM: Add up 10 numbers entered from the keyboard;"

PRINT " then, printout their sum total."

PRINT

sumTotal = 0

FOR eachNo% = 1 TO 10

IF eachNo% < 10 THEN PRINT " ";

PRINT eachNo%; "> ";

INPUT "Enter number: ", number

sumTotal = sumTotal + number

NEXT

PRINT

PRINT "The sum total of your 10 numbers is: "; sumTotal

END

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write Java program to display largest of 3 numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


How do you write a Qbasic program to display these Numbers-0112358132134?

you do this 10 print "0112358132134" use the whole of the thing


Write a 'c' program to fine a largest of three numbers?

largest of a, b, c :a > b ? a > c ? a : c : b > c ? b : c


How can you write a c program to display numbers in ascending order in array?

I know how to do this and you need to know how to do this. Why don't you do your best at writing this program and if it does not work then ask for help. You will not learn anything if I give you the answer.


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


Write a program to display the name of days when a user enters a number?

write a program to display your name age class schoolname e-mail 2hobby based on choice


Write a program to display your name on computer screen?

Faisal


How do you write a C plus plus program to read two numbers and display the larger value?

#include&lt;iostream&gt; int main (void) { int a, b; std::cout &lt;&lt; "Enter two whole numbers:"; std::cin &gt;&gt; a &gt;&gt; b; std::cout &lt;&lt; "The largest of " &lt;&lt; a &lt;&lt; " and " &lt;&lt; b &lt;&lt; " is &lt;&lt; (a&gt;b?a:b) &lt;&lt; std::endl; }


How do you write a program in c to display numbers from 0 to 9 along with the string?

#include &lt;stdio.h&gt; int main (void) { puts ("0123456789"); return 0; }


Write an algorithm to read two numbers then display the largest?

Read 2 numbers. If first is larger than second, display second, else display first. That's for the smallest. For the largest reverse the two. For each of the other two, it's easier to just create a variable, call it largest. Initialize it to a very small number, say -1. As you read each number, compare it to largest. If the number is larger than largest, set largest equal to the number. When you finish each list of numbers, then print largest. Best answer Read 2 numbers. If first is larger than second, display second, else display first. That's for the smallest. For the largest reverse the two. For each of the other two, it's easier to just create a variable, call it largest. Initialize it to a very small number, say -1. As you read each number, compare it to largest. If the number is larger than largest, set largest equal to the number. When you finish each list of numbers, then print largest.