Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Please solve in C launguage and show complete code. Submit only the C files with the name of the problem. No other file types will

Please solve in C launguage and show complete code.
image text in transcribed
image text in transcribed
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 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 filename,c - la Constraints: - 0<>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions