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
Please I need help to resolve this question
Started by PINK, Mar 19 2010 01:40 PM
17 replies to this topic
#1
Posted 19 March 2010 - 01:40 PM
|
|
|
#2
Posted 19 March 2010 - 01:46 PM
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
Posted 19 March 2010 - 01:47 PM
Edit: What he said ^
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)
Download the new operating system programming kit! (some assembly required)
#4
Posted 19 March 2010 - 01:52 PM
I need to know how i can write this program in c++ Language
#5
Posted 19 March 2010 - 01:53 PM
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
Posted 19 March 2010 - 01:57 PM
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)
Download the new operating system programming kit! (some assembly required)
#7
Posted 19 March 2010 - 02:11 PM
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
Please help me
and I promise you
Iwill do it by myself next time
#8
Posted 19 March 2010 - 03:21 PM
okay fine I need you to help my to find the way to put the row
#9
Posted 19 March 2010 - 03:34 PM
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
Posted 19 March 2010 - 03:51 PM
# 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";
}
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
Posted 19 March 2010 - 04:25 PM
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.
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
Posted 19 March 2010 - 04:43 PM
I don't know maybe it just need to print the table
plz I realy need to heeeeeeeeeeeeeeeelp
plz I realy need to heeeeeeeeeeeeeeeelp


Sign In
Create Account


Back to top









