Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in C. Need Help!! output should look like the bottom picture. Assignments #3 Submit only the C files with the name of the problem.

Code in C. Need Help!!
output should look like the bottom picture.
image text in transcribed
image text in transcribed
Assignments \#3 Submit only the C files with the name of the problem. No other file types will be accepted The remaining 2 points are for the coding style (indentation and spaces). Problem 1: Prime number (6points) A primer number is a positive integer number greater than 1 , and that is divisible only by 1 and itself. Ask the user to input n random numbers. Your task is to create a program that determine the biggest prime number. Requirements: - User can input any number (non prime, repeated). - If no prime was inputted, print "There is no any prime number". Use only one loop, excluding the for loop for scanning the elements. - If the user inputs a negative number, convert it into a positive number using the ternary operator "?... ..." - You can import \#include math. > and \#include stdbool. h> to use sqrt () function and boolean variables. - Print number of time the largest prime number appears (1pt). Note: if you have problems when compiling your program, use: gec Iflename, c 1= How many number do you have? 4 Insert number: 24 This number is not prime Insert number: 4 This number is not prime Insert number: 1 This number is not prime Insert number: 6 This number is not prime There is not any prime number 1 How any number do you have? 5 Insert number: 19 ints number is prine Insert number: 9 Thts number is not prime Insert number: 0 This nunber is not or tine Insert number: 7 Thts number is prine Insert number: 19 Thes nunber is prine the areatest priner number is 19 , and it appears 2 tines

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions