题解列表

筛选

使用数组求字符串分类统计

摘要://输入一行字符,分别统计出其中英文字母、数字、空格和其他字符的个数。 #include void main() { char x[200]; int a = 0, b = 0, c =……

求pi*的简单思路

摘要:解题思路:和数学的流程图差不多,弄 清楚逻辑就行了。注意事项:参考代码#include<stdio.h>#include<math.h>int main(){double i=1,c=1,sum=0,……

自定义函数之字符串连接(C语言)

摘要:解题思路:这个题主要是让自己定义个函数进行连接注意事项:自定义函数时形参需要定义,如char参考代码:#include<stdio.h>#include<string.h>void link(char……

用C语言筛选N以内的素数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int n;    scanf("%d",&n);    int i=2,j=2,m=1;    for(……

题解 1192: 十->二进制转换

摘要:参考代码:#include <stdio.h>#include <stdlib.h>int main(){    int x;   while(scanf("%d",&x)!=EOF)   {    ……

[编程入门]分段函数求值-题解

摘要:解题思路:x<1时,y=x;x>=10时,y=3*x-11;其他x的情况(即1=<x<10时),y=2*x-1;注意事项:1、函数分三段,任给x只需要进行两次判断【if()里面一次,else if()……