首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C语言
#include <stdio.h>
#include <iostream>
#include <math.h>

float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}

float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
......................
阅读全部 | czw2011 贴于 2022年3月26日 16:48     hide bbsi
#include <stdio.h>

unsigned foo( unsigned n );

int main( void )
{
    unsigned n;
    printf( "请输入台阶的级数:" );
    scanf( "%u", &n );
    printf( "走完%u级台阶有%u种走法\n", n, foo(n) );
}

......................
阅读全部 | 小神女 贴于 2022年3月20日 21:39     hide bbsi
#include <stdio.h>

unsigned foo( unsigned n );

int main( void )
{
    unsigned n;
    printf( "请输入台阶的级数:" );
    scanf( "%u", &n );
    printf( "走完%u级台阶有%u种走法\n", n, foo(n) );
}

......................
阅读全部 | 小神女 贴于 2022年3月20日 21:39     hide bbsi
#include <stdio.h>
int main()
{
float a, b, c, t;
scanf_s("%f,%f,%f", &a, &b, &c);
if (a > b)
{
t = a;
a = b;
b = t;
}
if (a > c) {
......................
阅读全部 | 快乐人儿 贴于 2022年3月16日 17:04     hide bbsi
/**
 * 【程序8】
 * 题目:输出9*9口诀。
 * 程序分析:分行与列考虑,共9行9列,i控制行,j控制列。
 */

#include<stdio.h>

int main() {
    int i,j,result;
    printf("\n");
    for (i=1;i<10;i++) {
......................
阅读全部 | yuanjie123 贴于 2022年3月10日 21:50     hide bbsi
color la
echo
color 2b
echo
color 3c
echo
color 4d
echo
color 5e
echo
color 6f
echo
......................
阅读全部 | ism 贴于 2022年3月9日 23:43     hide bbsi
#include <stdio.h>


int main()
{
    int a,b,c,d,e;
    float sum,aver;
    printf("Input 5 integers:");
    scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
    sum=a+b+c+d+e;
    ;aver=sum/5;
    printf("average=%f\n",aver);
......................
阅读全部 | 小羊就很棒 贴于 2022年3月7日 20:43     hide bbsi
#include <stdio.h>

void main()
{
  int a,b,c,d,e;
  float sum,aver;
  printf("Input5integers:");
  scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
  sum=a+b+c+d+e;
  aver=sum/5;
  printf("average=%f\n",aver);
}
阅读全部 | C_Sully 贴于 2022年3月7日 20:43     hide bbsi
#include <stdio.h>

void Main()
{
  int a,b,c,d,e;
  float sum,aver;
  printf("Input5integers:");
  scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e);
  sum=a+b+c+d+e;
  aver=sum/5;
  printf("average=%f\n",aver);
}
阅读全部 | C_Sully 贴于 2022年3月7日 20:24     hide bbsi
#include <stdio.h>

void main() 
{
    int a,b,c,d,e;
    float sum,aver;
    a=87;b=69;c=92;
    d=75;e=97;
    sum=a+b+c+d+e;
    aver=sum/5;
printf("average=%f\n\n",aver);
}
阅读全部 | sweet柚 贴于 2022年3月7日 19:38     hide bbsi
上一页 22 23 24 25 26 27 28 29 30 31 下一页