C++?????????????????????
???????????? ???????[ 2017/3/1 10:33:47 ] ??????????????????? .NET
??????????????????????
????1?????????
?????????????????????????????????????????????????????????????????????????????????????????????濉�??????????械??????????????????????????????????????????????intsize = 0;
????2?????????
????????????写?????????????????????“;”??伞??纾簊=(a+b+c)/2;
????3?????????????
??????printf();?????????????printf????谩?
????4??????????????
????????????????????“{}”??????????????????? ???????????????“;”??? ?????????魏尾?????????????????小?
??????????????if/switch??
????1??if??????????if/else if????????
??????if(????) ???
??????if(????) ???1 else ???2
??????
????if(????1) ???1
????else if(????2) ???2
????…
????else if(????n) ???n ...
????else ???n+1
??????1???????if??esle???卸?????????????????????些?????????????????泻?????1???????效??
??????2??if????械???????????????????????????????????????????????????
??????3??else?????????????????????????if???
????2??switch???
????switch (????)
????{
????case???????? 1?????1; break;
????case???????? 2?????2; break;
??????
????case???????? n?????n; break;
????default: ???n+1; break;
????}
??????1??switch?????械????????????????????????????????case????????????????????????????
??????2????case?械??????????????????????????小????????case???????眉?break??????break??????泻????case???
??????3??case????????????case??????????????????????
??????4??default?????????????娣�??????写?????
?????????????
????1??for
????for(????1??????2??????3)
????{
????// ???
????}
???????????????????1??????????????
????????????????斜???2???卸??
????????????????????????????????斜???3??????械??????????????????????????????
????break????????switch??????校???????switch????????????????????????????????????????????????????switch??????????!??
????continue????????????????????斜???3??????????????????????????????????????????????????????
????2??while????for?????效??
????while(????)
????{
????// ???;
????}
???????卸?????校?while???????????????械???????????小??????????????????????????while(1)???????break??????????
????3??do...while
????do
????{
????// ???;
????}while (????);
????????????????????卸???????????? true???????????????
????while????????????卸??????????true ???????????
????dowhile??????????卸??????????????????濉�
????// ?卸?????
????#include
????using namespace std;
????int main(void)
????{
????//????
????long m;
????cout << "please input a number:
";
????cin >> m;
????//????
????for(int i = 2; i < m; i++) //??m??????
????{
????if(m % i == 0)
????{
????break;
????}
????}
????//???
????if(m == i) //?卸?m???小??m????????
????{
????cout << m << " is prime.
";
????}
????else
????{
????cout << m << " isn't prime.
";
????}
????return 0;
????}
??????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11