热门

最新

红包

立Flag

投票

同城

我的

发布
m0_54716773
阿姨我真的不是吴彦祖
5 年前
truem0_54716773

#include"stdio.h"
void main()
{
long int total=1;
int n=1;
while(n<=10)
{
total*=n;
n++ ;
}
printf(“the result is %ld\n”,total);
}


#include"stdio.h"
main()
{
int day=0,buy=2;
float sum=0.0,ave;
do
{
sum+=0.8buy;
day++;
buy=2;
}while(buy<=100);
ave=sum/day;
printf("%f\n",ave);
}


#include"stdio.h"
void main()
{
int x, y, end=1;
int i;
printf(“please input x and y:\n”);
scanf("%d%d",&x,&y);
for (i=1;i<=y;i++)
end=end*x%1000;
printf("%d",end);

}


#include <stdio.h>
main()
{
int a,b,c;
for (a=1; a<=3; a++)
for (b=1; b<=3; b++)
for (c=1; c<=3; c++)
if (a!=1&&c!=1&&c!=3&&a!=b&&a!=c&&b!=c)

{
printf("%c will marry to a\n", 'x' + a - 1);
printf("%c will marry to b\n", 'x' + b - 1);
printf("%c will marry to c\n", 'x' + c - 1);
}
}

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
打印如下图形:#include"stdio.h"void main(){ int i,j; for(i=1;i<=5;i++) { for(j=1;j<=6-i;j++) printf(" "); for(j=1;j<=5;j++) printf("*"); printf("\n"); } }打印如下图形:#include"stdio.h"void main(){ int i,j; for(i=1;i<=5;i++) { for(j=1;j<=i;j++) printf(" "); for(j=1;j<=5;j++) printf("*"); printf("\n"); } }
立即登录