Jump to content

Please I need help to resolve this question

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
17 replies to this topic

#1
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
Please I need help to resolve this question in c++
write a program that calculates the squares and cubes the integers 0 to 10 . use tabs print the following neatly formatted table of values?

After that should come out black screen such as table
First row of integers and the second row is cube and Third row is for squares

#2
thechef

thechef

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
What problems specifically are you having with this? What do you have so far?
I don't document code. If it was hard to write, it should be hard to read ;)

#3
Guest

Guest

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,414 posts
Edit: What he said ^
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)

#4
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
I need to know how i can write this program in c++ Language

#5
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
write a program that calculates the squares and cubes the integers 0 to 10 . use tabs print the following neatly formatted table of values?

#6
Guest

Guest

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,414 posts
No one is going to do this for you. Please attempt at it at least. If you have any questions, we will help you.
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)

#7
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
No You Do not Understand I'm a Beginner and I tried hard to solve the Problem But I failed and I have to give the answer tomorrow
Please help me
and I promise you
Iwill do it by myself next time

#8
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
okay fine I need you to help my to find the way to put the row

#9
thechef

thechef

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
You said you tried and failed. Could you post the program that you wrote?
I don't document code. If it was hard to write, it should be hard to read ;)

#10
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
# include <iostream.h>
void main()
{
cout<<"integer\n"<<"1\n"<<2\n"<< "3\n"<<"4\n"<<"5\n"<<"6\n"<<"7\n"<<"8\n"<<"9\n"<<"10\n";
cout<<"cube\n"<<"1\n"<<4\n"<< "9\n"<<"16\n"<<"25\n"<<"36\n"<<"49\n"<<"64\n"<<"81\n"<<"100\n";
cout<<"squer\n"<<"1\n"<<8\n"<< "27\n"<<"64\n"<<"125\n"<<"216\n"<<"343\n"<<"512\n"<<"729\n"<<"10\n";


}

#11
bobdark

bobdark

    Programmer

  • Members
  • PipPipPipPip
  • 164 posts
umm the idea is to write an algorithm that calculates the wanted values and prints them. So why don't you start with writing a sequence of steps that the computer should perform in order to fullfill the given task? I will help give you a start:
1) currentNumber=0
2) print currentNumber^2
...
finalStep: if currentNumber is 10 then do (___)
else do (___)

So go ahead and try to fill the (___) spots and the steps that are taken between 2) and the finalStep.

#12
PINK

PINK

    Newbie

  • Members
  • PipPip
  • 10 posts
I don't know maybe it just need to print the table
plz I realy need to heeeeeeeeeeeeeeeelp