Find Jobs
Hire Freelancers

C++ Array

$1-6 USD

Completed
Posted almost 20 years ago

$1-6 USD

Paid on delivery
Write a program that reads in two numbers from the keyboard. (The program should ask the user to enter the numbers.) (The two numbers are on separate lines. Let's assume the first number is K and the second number is M.) PART 1: The program should store the following sentence in an array of characters: I LOVE COMPUTER SCIENE The program should send the K-th letter of the sentence to the screen M times. For example, if the numbers are K=3 and M=5 the program should send to the screen: LLLLL because L is the 3rd letter, and we asked to get it 5 times. Your program should assume that the input will be numbers, but it might contain "unreasonable numbers". Thus, if the input is a negative number, it should give an error message. If K is greater than 22, it should give an error message. If M is greater than 80 or equal to 0 or negative, it should give an error message. All error messages should be polite and informative. NOT just: Invalid Input. PART 2: As the last step, write a function ISPRIME with one integer argument that returns TRUE if the argument is a prime number. Then call this function from your main program with K and M as arguments: ISPRIME(K) ISPRIME(M) and print a friendly message informing the user that the number K (M) is or is not a prime number. ## Deliverables Please Comment all work done. 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Must complie on UNIX with g++ or similar.
Project ID: 3230173

About the project

2 proposals
Remote project
Active 20 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$3 USD in 2 days
4.9 (94 reviews)
4.3
4.3
2 freelancers are bidding on average $4 USD for this job
User Avatar
See private message.
$5.10 USD in 2 days
4.9 (212 reviews)
5.8
5.8

About the client

Flag of UNITED STATES
United States
5.0
3
Member since Apr 21, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.