ITPub博客

首页 > 应用开发 > > 这个用c语言怎么写

这个用c语言怎么写

作者:gfsuper 时间:2019-10-21 14:43:02 0 删除 编辑

Write a program that prompts the user to enter the size of an array (maximum of 10 elements).

Then prompt the user to enter the value of each element of the array.

Then your program must print to the screen the result of reversing the array.

For reversing the array you must use a function with the following header

void reverseArray(int A[ ], int size)

The array must be reversed in place.

1

2

3

4

5

6

7

8

Enter size of the array to reverse(max-size is 10):

5

Enter the 5 elements forthe array:

1 2 3 4 5

The original array is:

[1, 2, 3, 4, 5]

The reversed array is:

[5, 4, 3, 2, 1]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4442/viewspace-3141973/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: C# List问题
请登录后发表评论 登录
全部评论

注册时间:2019-08-22

  • 博文量
    93
  • 访问量
    575