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
Rushal Arora
NA
112
175.4k
Conversion from C++ to C#
Dec 11 2013 1:30 PM
#include "iostream"
using namespace std;
int main()
{
int num1,num2,hcf=0,cont=0,lcm;
do{
cout<<"Enter 2 number to find H.C.F OR G.C.D"<<endl;
cin>>num1>>num2;
for(int i=1;i<=num1 && i<=num2;i++)
{
if((num1%i == 0)&&(num2%i==0))
{
hcf=i;
}
}
cout<<"HCF ="<<hcf<<endl;
lcm=(num1*num2)/hcf;
cout<<"L.C.M = "<<lcm<<endl;
cout<<"want to continue"<<endl;
cin>>cont;
}while(cont>0);
return 0;
}
Reply
Answers (
2
)
program for armstrong series
WAnt to add grid and submit button in same view in MVC3