摘要:
问题描述: 编写一个函数,用来计算二维数组的两条对角线之和。 代码展示: 1 #include<stdio.h> 2 int fun(int A[4][4],int n); 3 int main(){ 4 int result; 5 int i,j; 6 int A[4][4]={{1,2,3,4} 阅读全文
posted @ 2021-12-02 13:59
空梦。
阅读(146)
评论(0)
推荐(0)
摘要:
问题描述: 输入a,b两个字符串,将两个字符串a,b连接起来。 代码展示: 1 #include<stdio.h> 2 #include<string.h> 3 int main(){ 4 char str1[100],str2[50]; 5 int len1,len2; 6 int i,j; 7 阅读全文
posted @ 2021-12-02 11:13
空梦。
阅读(603)
评论(0)
推荐(0)
摘要:
问题描述: 编写一个程序,输入一串字符串,以回车结束,判断该字符串是否是回文串,如“abcddcba”是回文串,即正读反读相同的串 代码展示: 1 #include<stdio.h> 2 #include<string.h> 3 int isHuiWen(char str[], int n); 4 阅读全文
posted @ 2021-12-02 11:04
空梦。
阅读(247)
评论(0)
推荐(0)
摘要:
问题描述: 编写一个程序,输入一个十进制的数,输出相应的二进制数,八进制数,十六进制数。 代码展示: 1 #include<stdio.h> 2 int main(){ 3 int x; 4 int num[50]; 5 int i,len=0,temp; 6 printf("请输入十进制数:"); 阅读全文
posted @ 2021-12-02 10:32
空梦。
阅读(334)
评论(0)
推荐(0)