Find Jobs
Hire Freelancers

C Assignment

$10-30 CAD

キャンセル
投稿日: 10年近く前

$10-30 CAD

完了時にお支払い
You are to write a program that: repeatedly requests the user to enter two sets of integers; calculates the difference between the two sets; prints the sets and the difference between them and a message indicating which set is larger. A sample run of this program is shown at the bottom of the page, your program should print output in the same format. Specific Requirements Your solution must contain and use the following functions: A function that reads a given number of integers from the keyboard into an array in dynamic memory and that returns a pointer to that array. The number of values to be read is given by the function's single integer parameter A function that calculates and returns the sum of the values in an integer array. The function should have parameters for the array and its size. A function that prints the contents of an integer array. The function should have parameters for the array and its size. Sample Run: Enter the number of values in the first set: 4 Enter 4 values 1 2 3 7 Enter the number of values in the second set: 3 Enter 3 values 1 2 3 set1 = {1,2,3,7} set2 = {1,2,3} set1 - set 2 = 7 The sum of set1 is larger Press q to quit, any other key to continue: y Enter the number of values in the first set: 5 Enter 5 values 5 4 6 3 1 Enter the number of values in the second set: 2 Enter 2 values 12 67 set1 = {5,4,6,3,1} set2 = {12,67} set1 - set 2 = -60 The sum of set2 is larger Press q to quit, any other key to continue: Enter the number of values in the first set: 3 Enter 3 values 4 5 6 Enter the number of values in the second set: 5 Enter 5 values 1 2 3 4 5 set1 = {4,5,6} set2 = {1,2,3,4,5} set1 - set 2 = 0 The sums of the sets are equal Press q to quit, any other key to continue: q
プロジェクト ID: 5925052

プロジェクトについて

1個の提案
リモートプロジェクト
アクティブ 10年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
この仕事に1人のフリーランサーが、平均$20 CADで入札しています
ユーザーアバター
A proposal has not yet been provided
$20 CAD 1日以内
4.9 (45 レビュー)
4.1
4.1

クライアントについて

INDIAのフラグ
Nasik (Nashik), India
0.0
0
メンバー登録日:3月 12, 2014

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。