Search:

Type: Posts; User: namenamename

Page 1 of 2 1 2

Search: Search took 0.29 seconds.

  1. Replies
    7
    Views
    169

    Re: 2D array problem

    Can you tell me what "nbr" stand for?
  2. Replies
    7
    Views
    169

    Re: 2D array problem

    You misunderstand me. Look at this original set of numbers:
    4 5 2 0
    7 2 1 4
    9 4 2 0
    7 8 9 3

    Transpose 1:
    2 2 4 8
    9 6 8 8
    0 2 6 9
  3. Replies
    7
    Views
    169

    Re: 2D array problem

    Output:
    Enter the number of the matrix:
    4
    Original:
    2 9 0 4
    2 6 2 5
    4 8 6 3
    8 8 9 3
    Transpose 1:
    2 2 4 8
  4. Replies
    7
    Views
    169

    2D array problem

    What the program is supposed to do:
    Write a program which builds two dimensional array ( n x n matrix ) with the dimentions entered by the user, populates the array with random numbers from 0 to 9,...
  5. Why am I getting so many errors in my code?

    import java.util.*;
    import java.io.*;

    class arraysort{
    public static void main(String args[]) throws Exception{
    int index,number=0;
    Scanner input = new Scanner(new...
  6. Replies
    1
    Views
    187

    selection sorting help?

    Hi guys, I'm trying to sort a string array that has 100 words using the selection sort algorithm. Here's my code so far:


    import java.util.*;

    class arraysort{
    public static void main(String...
  7. How to find the array index of the lowest value in the array?

    import java.util.Scanner;

    class array2{
    public static void main(String args[]){
    Scanner input = new Scanner(System.in);

    int values;
    int num[] = new int[10];...
  8. How do you sort an array? [using bubble sort]

    Here's my code:


    import java.util.*;

    class array1{
    public static void main(String args[]){
    Random number = new Random();

    int num[] = new int[100];
  9. Replies
    3
    Views
    672

    Re: help with necklace problem?

    no, and btw I'm new to java programming.
  10. Replies
    3
    Views
    672

    help with necklace problem?

    So the program begins with two single digit numbers. The next number is obtained by adding the first two numbers together and saving only the ones digit. This process is repeated until the necklace...
  11. Create a java program to determine what integers of two, three, and four digits are equal to the sum of the cubes of their digits?

    import java.util.*;
    import java.io.*;

    class Cubesum {
    public static void main(String args[]){
    int input=0;
    int num1,num2,num3;

    //read the number
    System.out.print("Enter a positive...
  12. Re: How to make this triangle upside down in java?

    *
  13. Re: How to make this triangle upside down in java?

    output is this:
    http://i.imgur.com/Rd4FYZh.png
  14. How to make this triangle upside down in java?

    class upsidedown {
    public static void main(String args[]){
    int x,y;
    for (y= 1; y <= 5; y++)
    {
    for (x= 0; x < 5-y; x++)
    System.out.print(' ');
    ...
  15. How to add the numbers in the following series?

    class series {
    public static void main(String args[]){
    int numerator, denominator;

    numerator = 1;
    denominator = 1;

    System.out.print(numerator);

    for(int...
  16. Re: How to alternate plus and minus signs in java?

    Now could you put that in English? I'm only a beginner in java.
  17. Re: How to alternate plus and minus signs in java?

    Ok now I have to add all those numbers together, for e.g., the sum of 1 - 1/2 + 1/3 - 1/4 + 1/5 = 0.783
  18. Re: How to alternate plus and minus signs in java?

    class series {
    public static void main(String args[]){
    int numerator, denominator;

    numerator = 1;
    denominator = 1;

    System.out.print(numerator);

    for(int...
  19. How to alternate plus and minus signs in java?

    So my code is:



    class series {
    public static void main(String args[]){
    int numerator, denominator;

    numerator = 1;
    denominator = 1;
  20. Replies
    2
    Views
    186

    Guessing game

    So I have the main part of the code which is letting the user guess a randomly generated number by the computer, but I now need to display how many guesses it took the user to guess the number.
    ...
  21. Re: How to generate multiple random numbers?

    so how do you fix it?
  22. How to generate multiple random numbers?

    Create a Randoms application that generates 16 random numbers between 1 and 100, inclusive and displays them in rows of 4.

    So here's what I have so far:

    import java.util.Random;

    class...
  23. Rock paper scissors program not displaying winner

    So this is my code so far:

    import java.util.Random;
    import java.util.Scanner;

    class rps2{
    public static void main(String args[]){
    Random number = new Random();
    Scanner input = new...
  24. Re: How to use a while loop to perform input validation?

    it's spelled "ass" not "arse". Get your spelling correct.
  25. Re: How to use a while loop to perform input validation?

    I just want a SIMPLE input validation loop
Results 1 to 25 of 30
Page 1 of 2 1 2