answersLogoWhite

0

Lcm and GCF in c plus plus?

User Avatar

Anonymous

∙ 15y ago
Updated: 8/18/2019

#include<iostream.h>

void main()

{

int x,y,r,a,b;

cout<<"enter the two numbers";

cin>>x>>y;

a=x;

b=y;

while(x%y!=0)

{

r=x%y;

x=y;

y=r;

}

cout<<"GCF="<<y<<"\n";

cout<<"LCM="<<a*b/y;

}

User Avatar

Wiki User

∙ 15y ago
Copy

What else can I help you with?

Related Questions

How do you find the LCM and GCF of two no in c?

#include&lt;stdio.h&gt; main() { int a,b,i,lcm,gcf; printf("\n Enter two numbers"); scanf("%d%d",&amp;a,&amp;b); for(i=0;i&lt;=a;i++) { if((b%i==0)&amp;&amp;(a%i==0)) { gcf=i; } } lcm=a*b/gcf; printf("\n GCF is %d and LCM is %d",gcf,lcm); }


What is the gcf of 3x4 plus 12x3 plus 27x?

=(3x) * (x^3+4x^2+9)


What is the LCM and GCF of 60 and 72?

The GCF is 12. The LCM is 360.


What is the GCF and LCM of 20 and 36?

The GCF is 4.


What is the GCF and LCM of 68?

The GCF is 68, the LCM is 68


What is the LCM and GCF for 6 and 14?

GCF is 2.LCM is 42.The GCF is 2.


What is the LCM and GCF of 32 56 and 72?

The LCM is 11592. The GCF is 2.


What is the LCM and GCF of 4 and 6?

The GCF refers to whole numbers, not decimals.


What is the GCF and LCM of 24 and 42?

The GCF and LCM of 24 and 42 are 6 and 168 respectively.


Gcf and LCM of 32 80 and 128?

The GCF is: 16The LCM is: 640The LCM is: 640


What is the GCF and LCM of 72 and 168?

Greatest Common Factor (GCF) for 72 168 is 24.Least Common Multiple (LCM) for 72 168 is 504.


Find the gcf and LCM of 4AcubeBsquare12AsquareB?

The GCF is 4a2b The LCM is 12a3b2

Trending Questions
What kind of energy is a tree input and output? What Are The Types of Rhinoplasty? Who plays Howard's wife on The Big Bang Theory? 350 warrior turning over but will not start? How many rads can be deadly? Where is the 1988 Honda cbr 250 battery? How deep can scuba divers can? What day of the week was Dec 5 1944? What is a common noun for Hollywood? Where defined x2-16 over x plus 5 over x plus 4 over x-5? Where do you locate the code to unlock the radio on your 1997 Cabrio Highline? What does it mean when the Check Engine Light stays on the entire time while driving a 1997 Buick LeSabre and hasn't gone off after getting an oil change? How did Booth implicate his fellow conspirators even before the deed was done? What is a sexton wheel? How do you say 'I never want to break up' in Spanish? What dramatic architecture arose during the middle ages? Who is the best male actor on star one? How do you install a motor for the power window on the drivers side of a 1997 Oldsmobile Aurora? When a raw shell-less egg was placed in sugar solution the egg shrank. The egg was brought back to its original size by placing it in water. Which process does the experiment demonstrate? What is a continent and what are the names?

Resources

Leaderboard All Tags Unanswered

Top Categories

Algebra Chemistry Biology World History English Language Arts Psychology Computer Science Economics

Product

Community Guidelines Honor Code Flashcard Maker Study Guides Math Solver FAQ

Company

About Us Contact Us Terms of Service Privacy Policy Disclaimer Cookie Policy IP Issues
Answers Logo
Copyright ©2025 Infospace Holdings LLC, A System1 Company. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Answers.