Answered step by step
Verified Expert Solution
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!!
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 output should look like the bottom picture.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started