Results 1 to 10 of 10
Thread: Java
Hybrid View
-
4th December 2008 13:08 #1
Java
Java. . , time 10 , 0000, 1000, 2000 9000. 5600 5000 . .
-
4th December 2008 13:59 #2Registered User
Join Date: Oct:2003
Location:
Posts: 4,317
, . . . . .
:
5600
5600:1000=5.6
bottom (5.6)=5
t[5] - 5000, 5600
.
-
5th December 2008 02:11 #3
2 + - / *, a ? b = , case. . : 10 0000, 1000,2000,3000...9000. 5600 5000 . 10
-
5th December 2008 15:46 #4
Join Date: Sep:2005
Location: Sofia
Posts: 18,517
-
5th December 2008 18:13 #5
Join Date: Jun:2002
Location: 85435
Posts: 4,619
Java .
X570 Aorus Elite || R5 3600x || NH-D14 || 32GB RAM || GTX1070Ti Ultra Silent || PCE-AC56 || 850 EVO+MP510+HDDs || SSR-650RT all in Dark Base 900 || EV2736W || G29 || Obutto Ozone+Sparco R333
-
5th December 2008 18:41 #6
Join Date: Sep:2005
Location: Sofia
Posts: 18,517
- . 1/n , . ,
-
20th December 2008 16:27 #7
, 10 10 , 10
[66,7,23,67,88,11,1,4,8,0]import java.util.Arrays;
import java.util.Scanner;
import static java.lang.Math.*;
public class test4e
{
public static void main(String... args)
{
Scanner sc = new Scanner(System.in);
int j, k, number, size=10;
boolean found = false;
int[] intArray = new int[size];
for (j=0; j<size; j++)
intArray[j] = (int) (random()*100);
System.out.print("Guess one of the numbers: ");
number = sc.nextInt();
k=0;
while (!found && k<size)
if (intArray[k]==number)
found=true;
else
k +=1;
System.out.println();
if (found)
System.out.println("Found in position " + k);
else
System.out.println("The number is not found");
System.out.println("\nThe random array for verification is:\n");
System.out.println(Arrays.toString(intAr ray));
}
}
[0,1,2,3,4,5,6,7,8,9]
-
20th December 2008 18:36 #8
Join Date: Sep:2005
Location: Sofia
Posts: 18,517
-
22nd December 2008 17:06 #9
-
22nd December 2008 18:01 #10
Join Date: Sep:2005
Location: Sofia
Posts: 18,517
- .
4345/1000*1000=4000
4345/100*100=4300




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in