Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C programming language develop a program to have the following: (a) Write a function and show all the prime number from 1 to 50.

Using C programming language
image text in transcribed
image text in transcribed
develop a program to have the following: (a) Write a function and show all the prime number from 1 to 50. (5 marks) (b) Calculates and shows the summation of all the numbers in (a). (15 marks) (c) Write a function to find and show the divisible numbers of (b). a (15 marks) (d) Define if each divisible number in (c) is a prime number or not. (15 marks) The program should look like the image shown in figure 2. The number 3 is a prime number. The number 5 is a prime number. The number 7 is a prime number. The number 11 is a prime number. The number 13 is a prime number. The number 17 is a prime number. The number 19 is a prime number. The number 23 is a prime number. The number 29 is a prime number. The number 31 is a prime number. The number 37 is a prime number. The number 41 is a prime number. The number 43 is a prime number. The number 47 is a prime number. The sum of all the prime numbers from 1 to 50 is 326. The number 326 is divisible by: 63 26 The number 163 is a prime number. rocess returned o (exe) mess any key to execution time: 0.039 s S

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions