惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
AWS News Blog
AWS News Blog
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
T
Threatpost
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA
F
Full Disclosure
博客园_首页
N
Netflix TechBlog - Medium
Security Latest
Security Latest
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
博客园 - Franky
P
Palo Alto Networks Blog
Project Zero
Project Zero
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
H
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
GbyAI
GbyAI

博客园 - 耀眼冰蓝

我回来了,好久不见,博客园,10年前我写的心血,如今依然在,这种精神非常的棒! 欲找情人 要做哪些准备? 春运圣经:6大秘籍买到回家的火车票! 买了一个新的域名和主机,呵呵, 学的东西忘记得差不多啦...... 2007年10月份_很想念大家 NND,8月没有来发贴,现在是9月了,要发一个 7月又过去了,发篇文章,表示我还在,还活着,还惦记着博客园 6月份的最后一天 励志视频(财商):管道的故事 两个月没有写随笔了,感谢大家的关照!冒出来跟大家,表明我还活着.呵呵!! 很好的一首英文歌曲:不论是旋律、还是歌词或者MV JavaScript 经典代码大全:有 目录 及 编号 的哦 ! CSS 实用笔记(代码详解) HTML语言:经典笔记 视频下载:HTML基础及应用 图片式笔记:多页面同步 笔记:不写一行代码,实现 DropDownList 和 GridView 联动 ASP.NET——From验证:全部代码及讲解
小练习:当输入一个总秒数时,将它转换为:X小时,X分,X秒的形式
耀眼冰蓝 · 2006-12-06 · via 博客园 - 耀眼冰蓝

 1 using System;
 2 using System.Data;
 3 using System.Configuration;
 4 using System.Web;
 5 using System.Web.Security;
 6 using System.Web.UI;
 7 using System.Web.UI.WebControls;
 8 using System.Web.UI.WebControls.WebParts;
 9 using System.Web.UI.HtmlControls;
10 
11 public partial class _Default : System.Web.UI.Page 
12 {
13     protected void Page_Load(object sender, EventArgs e)
14     {
15         //求两个人的平均分数,int类型的。
16         int mark1 = 84;
17         int mark2 = 95;
18         string aa = Convert.ToString(((mark1 + mark2) / 2));
19         Response.Write(aa);
20 
21         //求两个人的平均分数,double类型的。
22         double mark3 = 84;
23         double mark4 = 95;
24         string bb = Convert.ToString(((mark3 + mark4) / 2));
25         Response.Write("<br>" + bb + "<BR>");
26 
27     }
28     protected void Button1_Click(object sender, EventArgs e)
29     {
30         //目的1:字符串和数字之间的转换,Conver 类的使用;
31         //目的2:字符串连接符+,以及算数运算符/和%的使用。
32         //说明1:一个TextBox用于输入秒数,一个Button用于产生事件,一个label用于显示结果;
33         //说明2:int的长度是有限的,如果用户输入0,也会出现错误,要结合验证控件一起用。
34         //运行结果是:“当输入一个总秒数时,将它转换为:X小时,X分,X秒的形式”。
35         int totalSeconds = Convert.ToInt32(TextBox1.Text);
36         int hour = totalSeconds / 3600;
37         int minute = totalSeconds % 3600 / 60;
38         int second = totalSeconds % 60;
39         Label1.Text= Convert.ToString(  hour + "小时," + minute + "分," + second + "秒。");
40     }
41 }