当前位置:三九宝宝网 → 宝宝教育 → 教学论文 → 正文

VC 6 0如何输入10个数然后倒序输出我记得当时老师用的数组什

更新:12-28 整理:39baobao.com
字体:

[c语言中指针数组和字符串数组的区别高手请进!]#include "stdio.h" #include "string.h" void shellsort(char v[][10], int n); void writeline(char linp[][10],int n); main() { char line[][10]={"C++","Fortran","Basic","Pasca...+阅读

展开全部

//******************************************************************************

// 输入10个数然后倒序输出 数组

//******************************************************************************

#include

int main()

{

int i, a[10] = {0};

for(i = 0; i < 10; i++)

scanf("%d", &a[i]);

for(i = 9; i >= 0; i -- )

printf("%10d", a[i]);

getchar();

}

//祝你学习进步,更上一层楼!(*^__^*)

本文地址:https://www.39baobao.com/show/29_16395.html

以上内容来自互联网,请自行判断内容的正确性。若本站收录的信息无意侵犯了贵司版权,请联系我们,我们会及时处理和回复,谢谢.

以下为关联文档:

C语言字符指针和字符数组的区别两个用法差不多,唯一的区别在于字符数组的值在程序运行过程中是可以修改的,但是字符指针的值在运行过程中是不能修改的。 #include using namespace std; int main() { char *...

求教c语言二维数组的冒泡排序法1、打开Visual Studio工具并创建一个新的Win32程序。 2、在打开的C语言文件中,导入stdio.h空间,然后准备一个main函数。 3、接下来,准备一个需要进行冒泡排序的整数数组。如...

求C语言用冒泡法排序含n个数的数组a的程序#include<stdio.h> #include<vector> using namespace std; void fun(int *p,int n) //冒泡升序子函数 { for(int i=0;i<n;i++) for(int j=i+1;j<n;j++) { if(*(p+i)>*(p+j)...

c语言中数组中排序中的冒泡法是什么意思啊上午回答人家的,现在贴过来(楼上说的都是对的,你结合着理解看看): 找排序的区别,一定要动手(用笔,不是电脑)去执行代码,不用问你也可以看出代码怎么排的,而且你自己对这问题的理解也更...

C语言由键盘输入10个整数倒序输出#include <stdio.h> int main() { int numbers[10]; int count; for(count=0;count<=9;count++) { printf("请输入第%d个数:", count); scanf("%d", &numbers[count]); } for(count=...

C语言输入十个数将其倒序排列使用函数嵌套的方法#include <stdio.h> #define N 5 void input(int [ ], int); void output(int [ ], int); void sort(int [ ], int); int minpos(int [ ], int, int); void swap(int [ ], i...

c语言创建一个储存10个数字的链表并倒序输出#include #include struct node { int a; node *next; }; void output(node *p) { if (p != NULL) { output(p->next); printf ("%d ", p->a); } } int main() { int a, n; no...

C语言创建一个存储10个数字的链表并倒序输出我这里有个热乎的C++用类实现的,功能很齐全,在VS2010很好运行,C版本的目前没有,笔记本上貌似,你先看行不行,直接把代码上去就可以了。请采纳。#include using namespace std; type...

从键盘输入10个数存入数组数组中的元素交换成逆序然后输出# include <stdio.h> int main (void) { printf("请输入数字,数字中间以空格隔开。\n"); int a[10]; char ch; int j = 0; for (int k = 0 ; k < 10 ; k++) { scanf("%d%c" , &a[k]...