int testPoint = 85;
if (testPoint>=90) { std::cout<<"成績:優(yōu)秀"<<std::endl;
}else if( 90 >testPoint >= 75){std::cout<<"成績:良"<<std::endl;
}else if (75 > testPoint >= 60) {
std::cout<<"成績:及格"<<std::endl;
}else if ( testPoint<60 ){
std::cout<<"成績:不及格"<<std::endl;
}
if (testPoint>=90) { std::cout<<"成績:優(yōu)秀"<<std::endl;
}else if( 90 >testPoint >= 75){std::cout<<"成績:良"<<std::endl;
}else if (75 > testPoint >= 60) {
std::cout<<"成績:及格"<<std::endl;
}else if ( testPoint<60 ){
std::cout<<"成績:不及格"<<std::endl;
}
2023-05-28
#include <stdio.h>
int main(int argc,char **argv)
{
printf("Hello World!\n");
return 0;
} #include <stdio.h>
int main(int argc,char **argv)
{
printf("Hello World!\n");
return
int main(int argc,char **argv)
{
printf("Hello World!\n");
return 0;
} #include <stdio.h>
int main(int argc,char **argv)
{
printf("Hello World!\n");
return
2023-04-22
#include #include <stdio.h>
int main(int argc,char **argv)
{
printf("Hello World!\n");
return 0;
}
int main(int argc,char **argv)
{
printf("Hello World!\n");
return 0;
}
2023-03-27
#include <iostream>
using namespace std;
#include <string>
int main()
{
int a=1;
int b=2;
cout << "a+b=" << a+b<<endl;
cout << "a-b=" << a-b<<endl;
cout << "a*b=" << a*b<<endl;
cout << "a/b=" << a/b<<endl;
int c=5;
float d=3.25;
cout << "c+d=" << c+d<<endl;
}
using namespace std;
#include <string>
int main()
{
int a=1;
int b=2;
cout << "a+b=" << a+b<<endl;
cout << "a-b=" << a-b<<endl;
cout << "a*b=" << a*b<<endl;
cout << "a/b=" << a/b<<endl;
int c=5;
float d=3.25;
cout << "c+d=" << c+d<<endl;
}
2023-03-21
這里是不是講的不對(duì),a=100 轉(zhuǎn)short b 是因?yàn)?00在short的可轉(zhuǎn)換范圍內(nèi),如果你換成1000000試試,不管你是 short b = a,還是short b = (short)a; 都沒用,都會(huì)丟失
2023-03-19
#include<iostream>
#include<stdio.h>
using namespace std;
int main ()
{
char a;int b;
for(b=0;b<5;b++)
{
cout << "* * * * * * * *" << endl;
}
}
#include<stdio.h>
using namespace std;
int main ()
{
char a;int b;
for(b=0;b<5;b++)
{
cout << "* * * * * * * *" << endl;
}
}
2023-03-17