头像

无柒




离线:2天前


最近来访(5)
用户头像
Theo
用户头像
逆陽の葵
用户头像
yxc的小迷妹1
用户头像
violet_garden
用户头像
Tangent


无柒
2天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
int n;
while(cin>>n,n)
{
for(int i=1;i<=n;i++)
{
cout<<i<<’ ‘;
}
cout<<endl;
}
return 0;
}




无柒
2天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
int arr[100];
for(int i=0;i<100;i)
{
scanf(“%d”,&arr[i]);
scanf(“\n”);
}
int max=arr[0];
int temp;
for(int i=0;i<100;i
)
{
if(arr[i]>max)
{max=arr[i];
temp=i;}
}
int a;
a=temp+1;
printf(“%d\n”,max);
printf(“%d\n”,a);
return 0;
}




无柒
2天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
int x,y;
cin>>x;
int sum=0;
cin>>y;
if(x>y)
swap(x,y);
for(int i=x+1;i<y;i++)
{
if(i%2!=0)
sum=sum+i;
}
printf(“%d”,sum);
return 0;
}




无柒
2天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
float a[6];
int k=0;
for(int i=0;i<6;i)
{
scanf(“%f”,&a[i]);
}
for(int i=0;i<6;i
)
{
if(a[i]>0)
k++;
}
printf(“%d positive numbers”,k);
return 0;
}




无柒
2天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
if(i%2==1)
cout<<i<<endl;
}
return 0;
}




无柒
2天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
for(int i=1;i<=100;i++)
{
if(i%2==0)
printf(“%d\n”,i);
}
return 0;
}




无柒
4天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
float a,b,c,d;
scanf(“%f%f%f%f”,&a,&b,&c,&d);
float e;
e=(a2+b3+c*4+d)/10;
printf(“Media: %.1f\n”,e);
if(e>=7.0)

printf("Aluno aprovado.\n");
else if(e<=5.0)
printf("Aluno reprovado.\n");
else

{
printf(“Aluno em exame.\n”);
float y;
scanf(“%f”,&y);
printf(“Nota do exame: %.1f\n”,y);
int x;
x=(y+e)/2;
if(x>=5.0)
printf(“Aluno aprovado.\n”);
else
printf(“Aluno reprovado.\n”);
printf(“Media final: %.1f\n”,(y+e)/2);
}
return 0;
}




无柒
4天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main()
{
int a[3];
int b[3];
for(int i=0;i<3;i)
scanf(“%d”,&a[i]);
for(int j=0;j<3;j
)
{
b[j]=a[j];
}
int temp;
for(int i=0;i<2;i)
{
for(int j=0;j<2-i;j
)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
for(int i=0;i<3;i)
{
printf(“%d”,a[i]);
printf(“\n”);
}
printf(“\n”);
for(int i=0;i<3;i
)
printf(“%d\n”,b[i]);

return 0;
}




无柒
4天前

include[HTML_REMOVED]

include[HTML_REMOVED]

using namespace std;
int main(){
float a;
cin>>a;
if(a>=0&&a<=2000)
{
cout<<”Isento”<[HTML_REMOVED]=2000.01&&a<=3000)
printf(“R$ %.2f”,(a-2000)0.08);
if(a>=3000.01&&a<=4500)
printf(“R$ %.2f”,80+(a-3000)
0.18);
if(a>4500)
printf(“R$ %.2f”,80+270+(a-4500)*0.28);
return 0;
}




无柒
6天前

include [HTML_REMOVED]

include [HTML_REMOVED]

using namespace std;

int main() {
float arr[3];
float temp;
for (int i = 0; i < 3; i) {
scanf(“%f”, &arr[i]);
}
for (int i = 0; i < 2; i
) {
for (int j = 0; j < 2 - i; j++) {
if (arr[j] > arr[j + 1]) {
temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
float a, b, c;
a = arr[2];
b = arr[1];
c = arr[0];
if (a >= b + c)
printf(“NAO FORMA TRIANGULO”);
else {
if (a * a == b * b + c * c)
printf(“TRIANGULO RETANGULO\n”);
if (a * a > b * b + c * c)
printf(“TRIANGULO OBTUSANGULO\n”);
if (a * a < b * b + c * c)
printf(“TRIANGULO ACUTANGULO\n”);
if (a == b &&a==c&&b==c)
printf(“TRIANGULO EQUILATERO\n”);
if(a==b&&a!=c&&b!=c)
printf(“TRIANGULO ISOSCELES”);
if(a==c&&a!=b&&c!=b)
printf(“TRIANGULO ISOSCELES”);
if(b==c&&b!=a&&c!=a)
printf(“TRIANGULO ISOSCELES”);
}
return 0;
}