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
Maha
NA
0
326k
Multiplication table of any number
Apr 30 2014 8:48 AM
Following program is from a website. If + sign is removed the o/p is 10 * 10 = 100 only, please explain the reason. Problem is highlighted.
//If we know the range we will go for "for" loop.
using System;
class Program
{
static void Main(string[] args)
{
Console.Write("Table of: ");
int n = int.Parse(Console.ReadLine());
string s = "";
Console.WriteLine();
for (int i = 1; i <= 10; i++)
s
+
= n + " * " + i + " = " + n * i + "\n";
Console.WriteLine(s);
Console.ReadKey();
}
}
/*
Table of: 10
10 * 1 = 10
10 * 2 = 20
10 * 3 = 30
10 * 4 = 40
10 * 5 = 50
10 * 6 = 60
10 * 7 = 70
10 * 8 = 80
10 * 9 = 90
10 * 10 = 100
*/
Reply
Answers (
2
)
Problem in code while doing serach from datgridview.
How can I get some coulmn data by second