Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Microsoft Word . Labi Y S Calvin Klein 205w/39m 3163_ 1/courses/4189-21364/Lab06.pdf C+ + for1 3. Read the number of levels from the input and print

image text in transcribed
image text in transcribed
Microsoft Word . Labi Y S Calvin Klein 205w/39m 3163_ 1/courses/4189-21364/Lab06.pdf C+ + for1 3. Read the number of levels from the input and print an inverted pyramid. (2 points) low many levels: 9 ow many levels: 5 fef ae 4. Make a program for prime factorization (the decomposition of a composite number into a product of prime numbers). First, read a positive integer from the user. Output the equation if the input is a composite number, and output "it is a prime number" if it is a prime number. (3 points) lease input a positive integer: 90 02 33 5 doeasg ingut 2 positive integer: 16 16 2 22 2 Please input a positive integer: 101 101 is a prime number. Tips: 1. Start from finding the smallest prime factor of the number 2. If a factor k equals to the number n, end the process. 3. If the number n is divisible by k, get a new number n/k, and repeat the finding process. 4. If n is not divisible by k, try factor k+1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions