User Profile

Collapse

Profile Sidebar

Collapse
soccerboy77
soccerboy77
Last Activity: Sep 30 '12, 10:06 PM
Joined: Sep 6 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • soccerboy77
    replied to IF Statements
    in C
    @donbock
    I only need to go to up to the integer 20.
    @zmbd
    Its a class assignment
    See more | Go to post

    Leave a comment:


  • soccerboy77
    replied to IF Statements
    in C
    I know how to find perfect squares I just don't know how to write an if statement that can check the sums of x and y, and produce either a false or true statement.
    This is what I need to do: I have to write a program that gets two numbers between 1-20, square both of them to 2nd power, and say whether there sums is a perfect square.
    For example 3^2+4^2= 25. 25 is a perfect square so that would be true.
    See more | Go to post

    Leave a comment:


  • soccerboy77
    replied to IF Statements
    in C
    What do you mean code tags. I never used this site before. Sorry.
    See more | Go to post

    Leave a comment:


  • soccerboy77
    started a topic IF Statements
    in C

    IF Statements

    Heres a partial view of my code.
    Code:
    cout << "sqrt(x*x + y*y) = " << "sqrt(" << x*x << " + " << y*y << ") = " << sqrt(x*x+y*y) <<  endl; 
    	if(/*test for perfect square*/) 
    		cout << true;
    	else cout << false;
    	return 0;
    }
    I need help on what command to put where it says (/*test for perfect square)...
    See more | Go to post
    Last edited by Rabbit; Sep 6 '12, 08:44 PM. Reason: Please use code tags when posting code.
No activity results to display
Show More
Working...