C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 22PE
icon
Related questions
icon
Concept explainers
Question

Program in C language please

note the outputs need to be 12 = 2 * 2 * 3 (this is an example) not 

12
2 * 2 * 3

also note that the user need to input numbers until the user inputs a 0

Description

 

請寫一個程式做質因數分解

Please write a program for prime factorization.

 

Input

 

輸入會包含很多筆測試資料,每一筆測試資料就是一個正整數,當輸入為 0 的時候結束測試。

Input consist several test case. Every test case is just a integer. Input ended with 0.

 

Output

 

對每一筆測試資料輸出一行結果,格式請參考範例輸出。

Please reference the sample output.

 

Sample Input 1 

12
81
0

Sample Output 1

12 = 2 * 2 * 3
81 = 3 * 3 * 3 * 3
 
in C language please
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr