题解列表

筛选

1048: [编程入门]自定义函数之字符串拷贝

摘要:解题思路:注意事项:在这个示例代码中,我们使用函数来分别读入数字n、一行字符串和数字m。 然后,我们使用函数将从第个字符开始的子串打印出来,并输出结果。scanfprintfm需要注意的是,在函数中,……

输入输出--1.格式控制

摘要:注意事项: 右对齐:%5d:---20  ;  左对齐:%-5d: 20--- 。参考代码:#include<stdio.h>int main(){    int a,b,c;    scanf("%……

输入输出--2.单精度控制

摘要:解题思路: 单精度浮点数float参考代码:}#include<stdio.h>int main(){ float a;//单精度浮点数float; scanf("%f",&a); printf("%……

输入输出--3.双精度控制

摘要:解题思路:双精度浮点数double(与上一题对比看)参考代码:#include<stdio.h>int main(){ double a;//双精度浮点数double; scanf("%lf",&a)……

简单c语言代码

摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() {       int n = 0;     int sum = 0;     int a = 0; ……