幫我編個c 程序高分獎勵,幫我編個c 程式 高分獎勵!

時間 2022-12-07 21:10:53

1樓:q嘿仔

hint: in order to finish function samevalues, you can define other function(s).

根據這句提示,我自己定義了乙個函式,用來判斷a中的元素是否都存在於b中:

bool included(int a, int b, int size);

下面是**:

#include

using namespace std;

void read(int a, int n);

// read the first n elements of array a

bool samevalues(int a, int b, int size);

// compare two arrays of the same size

// it returns true if a and b contain the same values

const int size = 5;

int main()

// write the body of following functions

void read(int a, int n)

bool samevalues(int a, int b, int size)

bool included(int a, int b, int size)

}if (flag == false)

break;

}return flag;}

2樓:轉殖之龍

離問題結束還有 17 天 23 小時

有空再來看

幫我編個VB程序,幫我編個VB程式

private sub command1 click dim x 9 as integer randomize for i 1 to 100 a int 100 rnd print a if i mod 10 0 then printk right a,1 x k x k 1 next i for ...

幫我編個故事吧

一天,小壁虎離開媽媽,在竹林裡玩,不小心把長尾巴弄斷了。他傷心地來到河邊,看到河裡擺動著短尾巴的鯉魚說 喂,鯉魚叔叔,把您的尾巴借給我,好嗎?借不得,我要用它掌舵的。小壁虎轉身往回走,見到松鼠打著雨傘,就跑過去告訴它說 松鼠弟弟,把您的尾巴借給我,好嗎?不行,我要用它掌舵呢。後來,小壁虎又找到有尾巴...

C 程序設計教程,C 程式設計教程

c 的程式設計還可以啦 就是它裡邊其實講的c 的東西不多,c的多一些 因為c 和c有一些相同的地方 比較好的分法是 c 分為c,template c object oriented c stl四部分 effective c 3rd 也就是說譚浩強寫的大部分是我上面列舉的四個中的c部分,object ...

求高手給編個C語言程式,求高手編C語言程式 三者隨便乙個即可

題目不限嘛?給個郵箱給你發 如果只要求200行,樓上那位的確實的很好,呵呵 這個題目還真有意思。include void main 求高手編c語言程式 三者隨便乙個即可 20 第一題的 include include define num 5 int letter num int used num ...

c 程序語句問答,c 程式語句問答

1.首先主函式的 return 0 的作用是當程式正確執行的時候返回給系統 告訴系統我正確執行了 給你返回乙個值。因為你寫的主函式是int main 所以你必須返回乙個值。2.cin t.sec cin的作用當然是輸入 這個你應該知道的吧 如果不知道的話 那麼你應該看一些基礎的知識,t.sec是指t...