main()
{
int n
printf("输入一陪核个弊乱敬正整数:")
scanf("%d",&n)
if( n == 1 )
{
printf( "1\n" )
return
}
while(1)
{
if( n == 1 )
{
printf( "租慎1\n" )
return
}
if(n%2==0)
{
n/=2
printf("%d\n",n)
}
else
{
n=3*n+1
printf("%d\n",n)
}
}
}
#include <stdio.h>main()
{
int ch1, ch2
while ((ch1 = getchar()) != EOF)
弯拍 if (ch1>='a'&&ch1<='z')
{
稿姿ch2 = ch1 - 32
putchar(ch2)
}
else
键闹绝 putchar(ch1)
}
#include <stdio.h>int main()
{
float cost,percent,c
printf("请输入商品的原价(单位:元)");
scanf("%f",&cost)/乱乱*第一空*/
printf("请输入折扣皮颂率:")
scanf("%f",&percent)
c=cost*percent
printf("实际售价为燃陪郑:%0.2f ",c)
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)