首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴fuyumeng的代码贴全部
#include<stdio.h>
int main()
{
void bubble_sort(int a[10]);
int s[10],i;
for(i=0;i<=9;i++)
{
scanf("%d",&s[i]);
}
bubble_sort(s);
for(i=0;i<=9;i++)
{
......................
阅读全部 | 2019年1月30日 18:05
#include<math.h>
#include<stdio.h>
int main()
{
float a, b, c,d,e;
printf("Input parameters for the equation:\n");
scanf("%f %f %f", &a, &b, &c);
printf("The Equation: %fx^2+%fx+%f=0\n", a, b, c);
d = pow(b,2);
e = 4 * a*c;
if (d == e)
{
......................
阅读全部 | 2019年1月30日 18:02
//汉诺塔问题
#include<stdio.h>
int main()
{
void hanoi(int n, char one, char two, char three);
int m;
printf("input the number of diskes: ");
scanf("%d", &m);
hanoi(m, 'A', 'B', 'C');
}
//将n个盘子从"one"座借助"two"座移动到"three"座的过程
void hanoi(int n, char one, char two, char three)
......................
阅读全部 | 2019年1月30日 18:01
#include<stdio.h>
int main()
{
char c1, c2;
scanf("%c", &c1);
c2 = c1 + 32;
printf("%c\n", c2);
printf("%d\n", c2);
return 0;
}
阅读全部 | 2019年1月30日 17:58
#include<string.h>
#include<stdio.h>
int main()
{
char string[100];
int i,length,letter=0,number=0,space=0,others=0;
gets(string);
length = strlen(string);
for (i = 0; i < length; i++)
{
if (string[i] >= 'A'&&string[i] <= 'Z' || string[i] >= 'a'&&string[i] <= 'z')
letter += 1;
......................
阅读全部 | 2019年1月30日 17:55
1
fuyumeng