Question about Computers & Internet

1 Answer

Write a c program to find the largest prime factor of a number

The prime factors of 13195 are 5,7,13,& 29...so 29 is the largest prime factor of 13195. what is the largest prime factor of the number 600851475143?

Posted by on

Ad

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Sergeant:

    An expert that has over 500 points.

    Champion:

    An expert who has answered 200 questions.

  • Expert
  • 219 Answers

#include<stdio.h>
#include<conio.h>
void main()
{
int num,i=1,j,k;
clrscr();
printf("\nEnter a number:");
scanf("%d",&num);
while(i<=num)
{
k=0;
if(num%i==0)
{
j=1;
while(j<=i)
{
if(i%j==0)
k++; j++;
}
if(k==2)
printf("\n%d is a prime factor",i);
}
i++;
}
getch();
}

Posted on May 16, 2009

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

What is a prime factor


A factor that is a prime number. Any of the prime numbers that, when multiplied, give the original number. Example: Theprime factors of 15 are 3 and 5 (3×5=15, and 3 and 5 areprime numbers).

Jun 15, 2017 | Prime Computers & Internet

1 Answer

Number 2 is chosen to begin a ladder diagram to find the prime factorization of 66. What other numbers could have been used to start the ladder diagram of 66?


By changing the number for your prime factorization, you also have a different diagram.

Prime factorization for 66

66
/\
2*33
/\
3*11

Even if we change the prime factorization order, we still have the same numbers.

66 = 2 * 3 * 11

Feb 23, 2017 | Cars & Trucks

1 Answer

How do I get all the factors of a constant using my calculator?


There is a program on page 253 of the manual (http://support.casio.com/manualfile.php?rgn=5&cid=004002013) to get the prime factors of any number. You could modify the program to get all the factors.

Another way would be to do it manually. I start with the number 1 and go up to the square root of the number. The square root of 120 is 10.95, so let's go up to 11. Using 120 as an example:

120 /1 = 120 thus factor is (1, 120)
120/2 = 60 thus factor is (2, 60)
120/3 = 40 thus factor is (3, 40)
120/4 = 30 thus factor is (4, 30)
120/5 = 24 thus factor is (5, 24)
120/6 = 20 thus factor is (6, 20)
120/7 = 1.7 thus 7 not a factor
120/8 = 15 thus factor is (8,15)
120/9 = 13.3 thus 9 is not a factor
120/10 = 12 thus factor is (10,12)
120/11 = 10.9 thus 11 is not a factor.

Good luck.

Paul

Jul 05, 2015 | Casio FX-9750GII Graphing Calculator

1 Answer

I try to find LCM but keep getting error


I do not think that the FX115ES can give you the prime factor decomposition of a number. The FX115ES Plus may do it.
On the FX991 ES Plus there is key marked FACT.. It is the one between the Change sign key (-) and the HYPerbolic key.
I am afraid you will have to do the decomposition of the two numbers by hand. For example
1440=(2^5)(3^2)(5)
700=(2^2)(5^2)(7)
By multiplying the two number you can get a multiple of both but it won't be the smallest.
What you do is scan the two decompositions to identify the various prime factors, 2,3,5, 7
All those factors must be present in the LCM. For each prime factor, select the largest exponent . This is going to be 5 for factor 2, 2 for factor 3, 2 for factor 5, and 1 for factor 7
Hence LCM(1440,700)= (2^5)(3^2)(5^2)(7^1)=50400
Verify that 50400/1440=35 and 50400/700=72


Sep 22, 2014 | Casio FX-115ES Scientific Calculator

1 Answer

My casio fx-83GT Plus calculator wont do HCF for me


There is nothing you can do to make the calculator find the HCF for you. No point complaining about that. But if you are interested in doing it by hand (using the calculator to do the divisions for you) here how it is done.
  1. Decompose the first number in prime factors. If a prime factor is repeated use the exponent notation: That helps.
  2. Decompose the second number in prime factors too, using the exponent notation.
  3. Now look at the two decompositions. If a prime factor is present in both decompositions it must be in the HCD /HCF, with the smallest of its two exponents.
  4. Do that for all prime factors
Example: Here are the decompositions of two numbers
(2^5)*3*(5^4)(7^3)*11 and (2^3)*(5^6)*(11^2)*7
The prime factors that are present in both decompositions are
2, 5, 7, and 11
From the two decompositions select the smallest power of each common prime factor. They are represented in bold fonts.
2^3, 5^4, 7, 11
The highest common divisor/Highest common factor is
(2^3)*(5^4)*7*11

Mar 27, 2014 | Casio Office Equipment & Supplies

1 Answer

How do i factor numbers on a ti-30xs calculator


This calculator does not have a key that you can use to find the prime factor of an integer.
You can however use the calculator to find the factors
1. If number is even divide it by 2
Keep dividing by 2, while keeping track of how many times you divided by 2.
If you divided 5 times by 2 before getting an odd number, then your first factor is 2^5
2. Now try dividing by 3, keep track of the number of times you divided by 3 before you could not divide by 3 any more. If you divided 0 times by 3, your second factor is 3^0, or 1 and 3 is not a factor.
If you divided 4 times by 3, your second factor is 3^4
3. Divide by 5, until you can't any more. Keep track of the number of times you divided by 5.
4. Divide by all other prime numbers 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, etc. For each prime number, keep track of how many times you divided by it, until you could not any more.

Example: 23100
Division by 2
23100/2=11550 ---------> 1 division by 2
11550/2=5775 ----------> 2 divisions by 2
Note that 5775 is not divisible by 2. No more divisions by 2.
First factor is 2^2


Division by 3:
5775/3=1925 ----------> 1 division by 3
1925/3=641. 66667 Not an integer. No more divisions by 3.
2nd factor is 3^1

Division by 5 (number ends in 5)
1925/5 =385 -------> 1 division by 5
385/5=77 ----------> 2 divisions by 5 and no more (quotient does not end in 0 or 5)
3rd factor is 5^2

Division by 7
77/7=11 --------> 1 division by 7, and no more
4th factor is 7^1=7

Division by 11
11/11=1
5th factor is 11^1=11

Assembling the factors 2^2, 3^1, 5^2, 7, 11
Prime factorization of 23100 is
23100=(2^2)(3)(5^2)(7)11

Dec 18, 2013 | Texas Instruments TI-30XA Calculator

1 Answer

What is prime factorization?


"Prime Factorization" is finding which prime numbers multiply together to make the original number.


Example : What are the prime factors of 12 ? It is best to start working from the smallest prime number, which is 2, so let's check:

12 ÷ 2 = 6
Yes, it divided evenly by 2. We have taken the first step!
But 6 is not a prime number, so we need to go further. Let's try 2 again:

6 ÷ 2 = 3
Yes, that worked also. And 3 is a prime number, so we have the answer:

12 = 2 × 2 × 3

As you can see, every factor is a prime number, so the answer must be right.

Note: 12 = 2 × 2 × 3 can also be written using exponents as 12 = 22 × 3

Jun 22, 2011 | Computers & Internet

1 Answer

Find the prime number between 1 to 50


using System;

class MainClass {
public static void Main() {
int num;
int i;
int factor;
bool isprime;


for(num = 1; num < 50; num++) {
isprime = true;
factor = 0;

// see if num is evenly divisible
for(i=2; i <= num/2; i++) {
if((num % i) == 0) {
// num is evenly divisible -- not prime
isprime = false;
factor = i;
}
}

if(isprime)
Console.WriteLine(num + " is prime.");
else
Console.WriteLine("Largest factor of " + num +
" is " + factor);
}

}
}

Feb 01, 2011 | Computers & Internet

Not finding what you are looking for?

Open Questions:

0 Answers

Online Cloud Backup And Online Backup - Dataalign In vanilla terms, a backup or the process of backing up, refers to the copying and archiving of computer data so it may be used to restore the original after a data loss event. Backups have two distinct purposes. The primary purpose is to recover data after its loss, be it by data deletion or corruption. The simplest definition of a computer backup is an exact copy. In the case of computer files, we are referring to copies of the original files that you have on your laptop, desktop, or external drive. Creating a backup of original content means having that data saved in two places, but it's also important to make sure that those two places aren't on the same type of device. For example, if you have 3 copies of a working document on your computer, if your computer crashes, you will still lose all three. This makes the backup method and medium, an important thing to consider for your backup strategy. With the kind of Online Cloud Backup technology being used these days, it is extremely important to back up your files. Ideally, we store data files, movies, music, photos and our official documents on the computer. With the ever-changing technology, desktops and laptops have reduced in cost, and the quantum of storage inside them has surged considerably over the last few years. Unfortunately, storing all your data in only one place is risky. Accidental deletion, theft, computer loss, natural disaster is just some of the reasons that could cost you heavily as you stand out the chance to lose the data you've spent so long generating and collecting. Having an excellent backup strategy Computer Data Backup is the only way to battle the unexpected loss of data. There is more than one way to back up your computers, and using multiple forms of backup will minimize the risk of losing your valuable files. This is where, the PC Backup solution from DataAlign stands out of the rest and gives a one stop solution for Business Server Data Backup up your computer's data on the secure cloud servers. Our innovative platform has been designed while keeping you in mind. To provide optimal user experience we focus on simplicity and this in turn ensures that you will be able to backup and access large data quickly and smoothly.

Jun 19, 2018 | Quantum Computers & Internet

Computers & Internet Logo

Related Topics:

396 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18424 Answers

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

David Payne
David Payne

Level 3 Expert

14162 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...