首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C语言
#include <stdio.h>
#define SIZE 4
int main() 
{
    int arr[]={1,2,3,45,5,6,76,8,6,43,34,53};
    int i;
    for(i=0;i<sizeof arr/sizeof arr[0];i++)
    {
        printf("%d%10d\n",i ,arr[i]);
    }
return 0;
}
阅读全部 | wwj19991101 贴于 2022年7月17日 10:08     hide bbsi
#include <stdio.h>
void inter(int*u,int *v);
int main(void)
{
    int x=5,y =6;
    
    printf("%d %p\n",x,&x);
    printf("%d %p\n",y,&y);
    inter(&x,&y);
     printf("%d %p\n",x,&x);
     printf("%d %p\n",y,&y);
return 0;
......................
阅读全部 | wwj19991101 贴于 2022年7月15日 16:20     hide bbsi
#include<stdio.h>
int facr(int n);
int main()
{
   int num;
   scanf("%d",&num);
   printf("%d",facr(num));
   //printf("%d",rfact(num));
    return 0;
}
int facr(int n)
{
......................
阅读全部 | wwj19991101 贴于 2022年7月15日 15:08     hide bbsi
Option Explicit
Const C_GameWith = 1024
Const C_GameHeight = 768
Const C_GameSmallWith = 320
Const C_GameSmallHeight = 240
'黑带   16  20
Dim GamehWnd, dm, AppName, config, bgkms, KMData
config = ".\Angel.ini"
AppName = "Angel_BP"
Function CmpMutlColor(Args, Sleep)
    Dim i
    For i = 0 To UBound(Args)
......................
阅读全部 | Qwe899 贴于 2022年7月15日 13:30     hide bbsi
/**
 * 【程序2】
 * 题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月
 *       后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
 * 程序分析:兔子的规律为数列1,1,2,3,5,8,13,21....
 */

// #include<stdio.h>

// int main() {
//     long int f1,f2;
//     int i;
......................
阅读全部 | dzyyyy 贴于 2022年7月15日 12:17     hide bbsi
#include<stdio.h>
int imax(int n,int m);
int main()
{
    printf("the maximum of %d and %d is %d.\n",3 ,5,imax(3,6));
    printf("the maximum of %d and %d is %d.\n",3 ,5,imax(3.0,5.0));
    return 0;
}
int imax(int n,int m)
{
    return(n>m?n:m);
}
阅读全部 | wwj19991101 贴于 2022年7月15日 11:13     hide bbsi
#include <stdio.h>
 #define coverage 350
int main() 
{
   int sq;
   int cans;
   printf("请输入面积\n");
   while(scanf("%d",&sq)==1)
   {
       cans=sq/coverage;
       cans+=((sq%coverage==0)) ?0:1;
       printf("you need %d %s of paint.\n",cans,cans==1 ?"can":"cans");
......................
阅读全部 | wwj19991101 贴于 2022年7月14日 08:42     hide bbsi
#include <stdio.h>
 #define coverage 350
int main() 
{
   int sq;
   int cans;
   printf("请输入面积\n");
   while(scanf("%d",&sq)==1)
   {
       cans=sq/coverage;
       cans+=((sq%coverage==0)) ?0:1;
       printf("you need %d %s of paint.\n",cans,cans==1 ?"can":"cans");
......................
阅读全部 | wwj19991101 贴于 2022年7月14日 08:42     hide bbsi
#include<stdio.h>
int main()
{
int i,j,result;
for(i=1;i<10;i++)
{
for(j=1;j<10;j++)
{
result=i*j;
printf("%d*%d=%-3d",,j,result);
}
printf("\n");
......................
阅读全部 | 王宇577 贴于 2022年7月10日 03:30     hide bbsi
11111
阅读全部 | 王宇577 贴于 2022年7月10日 03:29     hide bbsi
上一页 14 15 16 17 18 19 20 21 22 23 下一页