题解列表

筛选

编写题解 1231: 杨辉三角

摘要:解题思路:注意事项:参考代码:#include "stdio.h" int main() {   int n, i, j;   int a[30][30];   while (scanf("%……

c语言解决机器人繁殖

摘要:解题思路:x为初始机器人数量,n为经过的年数,s为机器人总数。分别列出每年复制出的机器人和总数!每年出生为 前一年出生的两倍减去飞向太空的一个。第一年出生:2x-1  第二年出生:2(第一年出生)-1……

利用scanf的特性

摘要:解题思路:注意事项:注意最后一个单词有 . 号参考代码:#include<stdio.h>#include<string.h>int main(){ char str[1000][500]; int ……

进制转换——除基取余(C)

摘要:参考代码:#include<stdio.h>int main(){    int a;    scanf("%d",&a);    int ans[31],num=0;//ans存放8进制的每一位  ……

字符串去掉空格

摘要:解题思路:注意事项:参考代码:#include<string.h>去掉空格int main(){ int i; int j = 4; int n; char arr[1000]; while (j) ……

ASCII值赋值之输出亲朋字符串

```c#include#includeintmain(){chara[101],b[101];//因为字符串长度最大为100,101是因为字符串最后一位是\0gets(a);//VisualStudio22版本要用gets_s(a)函数,这里的编译器就用gets(a)intsize=strlen(a