- 博客(6)
- 收藏
- 关注
原创 利用栈进行进制转换
方法一 (硬算) #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> typedef struct StackNode{ int data; struct StackNode *next; }StackNode,*Linkstack; void InitStack(Linkstack *S){ *S=NULL; } void PushStack(Links.
2021-12-15 11:56:10 320
原创 Matlab
问题:用MATLAB编写一个函数,函数功能为要求你输入华氏温度,计算其相应的摄氏温度。当你输入为非空的数值时,会进行计算并要求你继续输入下一个华氏温度,当你输入空的数值时,函数结束 function C=F2C() while 1 F = input('tempreature in F is: '); if isempty(F) break end C = (F-32)*5/9; fprintf('C=%2.2f\n',C); end ...
2021-07-26 18:27:51 79
原创 林大OJ-2016高级语言设计阶段考试历年真题
Problem A 2016年 #include <stdio.h> #include <stdlib.h> #define LEN 100 int main() { int i,num[10],min; char a[100]; while(gets(a)!=NULL){ for(i=1;i<=4;i++) num[i]=0; // printf("%s\n",a); for(i=0;a[i]!='\0'
2021-05-07 22:00:24 68
原创 算法设计与分析实验-锐格测试题
** 实验一递归与分治 6102 #include <stdio.h> #include <stdlib.h> int board[100][100]; int tile=1; void chessboard(int tr,int tc,int dr,int dc,int size){ if(size==1) return; int t=tile++; int s=size/2; if(dr<tr+s&&dc<tc+s)
2021-04-11 17:45:30 187
原创 JAVA程序设计题
锐格1464 在这里插入代码片 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int [][]a = new int [4][4]; for(int i=0;i<4;i++){ for(int j=0;j<4;j++) a[i][j]=scan.ne
2021-03-24 14:24:24 181
原创 锐格测试题【数组与指针】
标题 锐格系统测试题5812 解题思路: 首先先判断单词,遇到非字母的就\0,判断字符串是否为空,得到的单词存到一个二维数组里,在倒序输出 以下为代码: #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char ch,a[100],b[30]; int n,i,j,k,num; char word[100][100]; printf("Enter a
2021-03-24 14:11:30 798
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人