C++语言程序设计课件.pptxVIP

  • 10
  • 0
  • 约3.88万字
  • 约 668页
  • 2023-11-20 发布于山东
  • 举报
C++簡單程式設計;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;#include iostream using namespace std; int main() { int year; bool IsLeapYear; coutEnter the year: ; cinyear; IsLeapYear = ((year % 4 == 0 year % 100 != 0)||(year % 400 == 0)); if (IsLeapYear) coutyear is a leap yearendl; else coutyear is not a leap yearendl; };運行結果: Enter the year: 2000 2000 is a leap year;46;47;#includeiostream using namespace std; int main() { int x,y; coutEnter x and y:; cinxy; if (x!=y) if (xy)

文档评论(0)

1亿VIP精品文档

相关文档