This problem is to print a square using a number that the user enters, which would be in the center. If the user entered a 5, then the program should output this: 111111111 122222221 123333321 123444321 123454321 123444321 123333321 122222221 111111111 If you're wondering, this was not a homework assignment. It was on a quiz, and I did not know how to do it. So if someone could give me at the very least some guidance on how to solve this problem, then that'd be nice. I know that I need to use for loops, but I'm not quite sure … +0 I'm so confused on this, can anyone please give me a hand. Thank you in advance. A program that uses the numbers from 1 - 12 and output the number, the square of the number, the cube of the number and finally the square root of the number. At the end give me a grand total of the square roots. +0 Hi everyone, i need your help.. I want to draw a circle,square and rectangle on Jframe on a click of a button.. This program was asked in my test paper, i couldn't get it right though bt i wanna know what my mistake is.. Plz help me.. import javax.swing.*; import java.awt.*; import java.awt.event.*; public class CRS extends JFrame implements ActionListener { JButton b1,b2,b3; Graphics g; Container con; public CRS() { super("Draw Circle in JFrame"); con=getContentPane(); con.setLayout(new FlowLayout()); b1=new JButton("Circle"); b2=new JButton("Rectangle"); b3=new JButton("Square"); con.add(b1); con.add(b2); con.add(b3); b1.addActionListener(this); b2.addActionListener(this); b3.addActionListener(this); } public void Circle() { g.drawOval(50,50,100,100); } public void Rectangle() { … +0 a hollow square. 5x5 +0 So i have to write a c++ program for the Graeffe's square root method I have am stuck here when i have this formula transform into c++ code, the formula is on the link The code works particulary, the (elem[j-1]*elem[j+i]) doesn't work, it's beeing ignored and i don't know why... can any one help me? [http://latex.codecogs.com/gif.latex?A_{k}=a_{k}^{2}+2\sum_{s=1}^{k}(-1)^{s}a_{k-s}*a_{k+s},&space;k=0,....n](http://latex.codecogs.com/gif.latex?A_{k}=a_{k}^{2}+2\sum_{s=1}^{k}(-1)^{s}a_{k-s}*a_{k+s},&space;k=0,....n) cout<<"How many elements?"<>n; cout<<"Insert the elements:"<>elem[i]; } C[0]=pow(elem[0],2); for(int j=1; j #include using namespace std; void PrintMatrix( int x[][20], int size) { for(int i = 0; i < size; ++i) { for(int j = 0; j < size; ++j) { cout << x[i][j] << "\t"; } … +0 hiii.! how to make a hollow square of asterisks by entering a size of side by user, for example if 4 is entered then, it will be print, * * * * * * * * * * * * of 4*4. +0 how to test if a num is a square root? ex: 9 is square root 3 is not square root ///////////////////////////////////////////// //do not worry about sytax. int x = 0; //always start at 0 int y = 101010; //is this a square root? square(x, y){ if((x*x) >= y){ //not a square root return false; } else if((x*x) == y) //it is a square root return true; } else{ //inc x by 1 square(x+1, y); } } this algorithm works fine when y is small int. ex 4, 10, 20. but when i put y to be large ex 10000. than … +0 I’m making programs which will separate a two digit number from a textbox to two different labels. Later I want to take those two separate numbers and square them indiviudally and add them together. It would be great if someone can get me some help. This is what I have so far: Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Label1.Text = "First digit:" & TextBox1.Text.Substring(0, 1) Label2.Text = "Second digit:" & TextBox1.Text.Substring(1, 1) Label3.Text = (Label1.Text) ^ 2 End Sub End Class +0 I was wondering the best way to implement a square root button. Below has everything from 0-9, the four functions, and a decimal and clear function. Dim valueOne As Single Dim valueTwo As Single Dim operation As Integer Dim answer As Single Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.TextBoxDisplay.Text += "1" End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.TextBoxDisplay.Text += "2" End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.TextBoxDisplay.Text += "3" End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal … +0 public static void sumOfSquareRoots() { Scanner scan = new Scanner( System.in ); double value; // read in a double System.out.print ("Enter a double:"); value = scan.nextDouble(); // calculate its square root double result = Math.sqrt( value ); // write out the result System.out.println("square root of your number is " + result ); System.out.println("The sum of square root of numbers is"+result); } "This calculates the square root of a given number how do I add multiple numbers and add the sum of the square roots ? +0 I have a code on the Internet and I have rewritten it, but there are t and n3 variable in the odd_order function that I don't understand their meaning. Please help me to explore it. :D. This code is generating a odd order magic square. Magic Squares

The End.