Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Multiply Two Numbers Without Using * Operator
WhatsApp
Atul Rawat
Aug 25
2014
2.9
k
0
1
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();
}
}
}
Multiply number without using operator
C# Programming
Up Next
Multiply Two Numbers Without Using * Operator