- 博客(8)
- 收藏
- 关注
原创 MYSQL Workbench server status stopped 如何解决?求解
MYSQL Workbench server status stopped 如何解决?求解
2022-06-16 07:27:38
630
3
原创 穷举法求因子
#include<iostream>using namespace std;int main(){ int n; cout<<"输入n值"; cin>>n; cout<<"Number"<<n<<"Factor"; for(int i = 1;i<=n;i++) if(n%i == 0) cout<<i<<" ";
2021-07-17 22:53:05
87
原创 while,do while语句应用比较之累加
#include<iostream>using namespace std;int main(){ int i = 0 ; int sum = 0; while(i<=10) { sum+=i; i++; } cout<<sum<<endl; return 0;}```cpp55Process returned 0 (0x0) execution time
2021-07-17 22:34:16
134
原创 switch应用之判断星期数
#include<iostream>using namespace std;int main(){ int day; cin>>day; switch(day) { case 0: cout<<"Sunday"<<endl; break; case 1: cout<<"Monday"<<endl.
2021-07-17 22:25:17
130
原创 比较两个数大小
#include<iostream>using namespace std;int main(){ int x,y; cout<<"Enter x and y:"; cin>>x>>y; if(x!=y) if(x>y) cout<<"x>y"<<endl; else cout<<"x<y"&l
2021-07-17 22:13:44
62
原创 2021-07-17
c++判断闰年#include<iostream>using namespace std;int main(){ int year; bool isleapyear; cout<<"enter the year:"; cin>>year; isleapyear = ((year%4 == 0&&year%100!= 0)||(year%400 == 0)); if(isleapyear)
2021-07-17 22:05:26
43
原创 JAVA程序设计11版梁勇第二章答案(持续中***)
2.1关于摄氏度转华氏度的问题import java.util.*;public class Main{ public static void main(String[] args) { Scanner input = new Scanner (System.in); double celsius = input.nextDouble(); double fahrenheit ; fahrenheit = (9.0/5)*celsius+32; System.out.printl
2021-01-15 23:13:55
470
原创 Java程序设计与数据结构11版梁勇第一章答案(部分)
Java程序设计与数据结构11版梁勇第一章答案(部分)1.2public class Main { public static void main(String[] args) { for(int i = 0;i<5;i++ ) { System.out.println("Welcome to Java"); } }}1.3public class Main { public static void main(String[] args) { System.out.
2021-01-11 23:39:10
410
4
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人