Search:

Type: Posts; User: Daler

Search: Search took 0.22 seconds.

  1. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Can anybody explain me why javapenguin ws banned?
  2. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Thank you for help javapenguin and Norm! I really appreciate it... I learn a lot from both of you guys.
  3. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    That's awesome, look at the output:

    [java=code]
    Enter how many random numbers you want to generate
    100
    0. ***********
    1. *************
    2. ********
    3. ****
    4. *********
  4. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Now I don't see any mistakes, except after I enter the numbers

    [java=code]freq [k]++; // it shows mistake here[/code]

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -5...
  5. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Yes! I changed it to


    int freq = (int) (Math.random() * 10);



    import java.util.*;
    public class xyz
    {
  6. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    //Don't you mind to show me how to fix this?
    //the last line was just a comment
  7. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Norm,

    int [] freq = (int) (Math.random() * 10); // cannot convert from int[] to int

    this is the only mistake.. is it possible to fix this??
  8. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    import java.util.*;
    public class xyz
    {
    public static void main(String [] args)
    {
    Scanner S=new Scanner(System.in);
    System.out.println("Enter how...
  9. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    It doesn't show any mistake before I launch it, but after I've entered the number I wanted to generate, it showed me this mistake


    Exception in thread "main"...
  10. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Alright! Here is my code:



    import java.util.*;
    public class Shapes
    {
    public static void main(String [] args)
    {
    Scanner S=new Scanner(System.in);
  11. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    What does this mistake mean:

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException… -3
    at pratice.main(pratice.java:16)

    it should work now.. I don't know why it does appear that...
  12. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    so if I will use arrays, it should look like this?

    import java.util.Scanner;
    public class shapes
    {

    public static void main (String [] args)
    {

    Scanner scan = new Scanner(System.in);
  13. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    I am not really sure about arrays. We didn't cover the topics about arrays though. Can you tell me more about it?
    In the first loop we just put like

    for(double num= Math.random(); num <= 10;...
  14. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Ok! I will try, but if I am wrong, sorry...

    1. Understand what the program is supposed to do. ( I understand, but not so clearly as I should)
    2. Initialize and declare the variables(I should...
  15. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    what about double num = Math,random(); do I have to use it before loop?
  16. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    but what about double num = Math,random() ? Where do I have to use it?
  17. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Am I right using "while" instead of "for"? Sorry, I am just new to programming...
  18. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    So I have to use if-else ?
  19. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    I got it, but for example if you wrote 100 as an input, how do the program knows how many *s are needed? How to make *s instead of just random numbers??
  20. Replies
    47
    Views
    4,759

    Re: Guys, really need your help

    Alright. I know how to do random numbers, but I don't get how to turn them into stars like in the output above... and if you write 100, it will show you 100 stars.. I really don't have an idea what...
  21. Replies
    47
    Views
    4,759

    Guys, really need your help

    I just don't know where to start, and what to do now, if you have some suggestions please help me out :)

    Here is a problem:

    Write a program that prints a chart to the screen showing the...
Results 1 to 21 of 21