Find Jobs
Hire Freelancers

C++ Array

$1-6 USD

已完成
已发布将近 20 年前

$1-6 USD

货到付款
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.
项目 ID: 3230173

关于此项目

2提案
远程项目
活跃20 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
See private message.
$3 USD 在2天之内
4.9 (94条评论)
4.3
4.3
2威客以平均价$4 USD来参与此工作竞价
用户头像
See private message.
$5.10 USD 在2天之内
4.9 (212条评论)
5.8
5.8

关于客户

UNITED STATES的国旗
United States
5.0
3
会员自4月 21, 2004起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。