TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prime b
NA
810
345.9k
Loops problem please help!
Jan 4 2012 7:03 PM
The problem
Write a console-based application that displays a
multiplication table of the product of every integer from
1 through 10 multiplied by every integer from 1 through
10.
What I have done so far
double firstNumberBottom = 1;
double increment;
double something;
const double firstNumberTop = 1;
const double maxNumberTop = 10;
const double numberIncrement = 1;
const double maxNumberBot = 10;
const double maxNumberincrement = 1;
Console.WriteLine(" Number");
for (increment = firstNumberTop; increment <= maxNumberTop; increment += numberIncrement);
Console.WriteLine("{0, 8}", increment.ToString("F"));
Console.WriteLine();
Console.WriteLine
("-------------------------------------------------");
increment = firstNumberTop;
while (firstNumberTop <= maxNumberBot)
{
Console.WriteLine("{0, 8}", firstNumberTop.ToString("C"));
while (increment <= maxNumberTop)
{
something = firstNumberTop * increment;
Console.Write("{0, 8}", something.ToString("F"));
increment += 1;
}
firstNumberBottom += maxNumberincrement;
increment = firstNumberBottom;
Console.WriteLine();
}
It doesnt work.....
It should look something like that I am guessing
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
Reply
Answers (
9
)
Compiling & Execution
how to play wav files according to inputs given?