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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Multiply Two Numbers Without Using * Operator
Atul Rawat
Aug 25
2014
Code
2.5
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
namespace
multiplytwonumber
{
class
Program
{
static
void
Main(
string
[] args)
{
Console.WriteLine(
"enter first number"
);
int
num1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(
"enter second number"
);
int
num2 = Convert.ToInt32(Console.ReadLine());
int
mul=0;
for
(
int
i = 0; i < num2; i++)
{
mul = mul + num1;
}
Console.WriteLine(mul);
Console.ReadKey();
}
}
}
C# Programming
Multiply number without using operator