烧开水

先询问:“是否要烧开水(Y/N)”

是的话执行--0°--100°(30°---水温了,50°---水热了,80°---水快开了,100°---水已经开了,
结束。)

判断 循环 选择 跳转

闹钟服务
定义需要提醒的时间(2015-03-04 18:30)看新闻联播。。。。。

获取当前时间,时间以分钟为单位循环增加,直到判断与定义闹钟时间相等时选择提醒是否关闭闹钟,否的话,定义时间增加五分钟后再次提醒。

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace MYTest
{
class Program
{
static void Main(string[] args)
{
/* Console.WriteLine("请输入判断年份:");
int x = Convert.ToInt32(Console.ReadLine());

if (x%400==0||(x % 4 == 0&&x%100!=0))
{

Console.WriteLine(x+"是闰年!");
}
else
{
Console.WriteLine(x + "不是闰年!");
}

*/

/*
Console.WriteLine("请输入三个数自动判断大小:");
int a, b, c, jg;
a = Convert.ToInt32(Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
c = Convert.ToInt32(Console.ReadLine());
if (a>b&&a>c)
{
jg = a;
}
else if (b>a&&b>c)
{
jg = b;
}
else
{
jg = c;
}
Console.WriteLine("最大的数是" + jg);*/

/*
Console.WriteLine("请输入一个24以内的数:");
int a;
string zh;
a = Convert.ToInt32(Console.ReadLine());
if (a>12)
{
if (a==24)
{
zh = ("00AM");
}
else
{
zh = (a - 12)+"PM";
}

}
else
{
zh = a + "AM";
}
Console.WriteLine(zh);
*/

//Console.WriteLine("我们结婚吧");
//string a, b, c, jg = "无语。。。。";
//Console.WriteLine("女神问:“有房子么?”");
//a = Console.ReadLine();
//if (a == "有")//如果有房子我就问下一个问题
//{
// Console.WriteLine("女神问:“有车子么?”");
// b = Console.ReadLine();
// if (b == "有")//如果有车子我就问下一个问题
// {
// Console.WriteLine("女神问:“有票子么?”");
// c = Console.ReadLine();
// if (c == "有")//如果有票子。。。。。
// {
// jg = "我们结婚吧";
// }
// else//没有票子如何回答
// {
// jg = "抓紧赚钱吧";
// }
// }
// else//没有车子女神如何回答
// {
// jg = "抓紧买车吧,然后再说。";
// }
//}
//else//没有房子女神如何回答
//{
// jg = "连房子都没有,我就不往下问了。";
//}

//Console.WriteLine(jg);
//Console.ReadKey();

//Console.WriteLine("我们结婚吧");
//string a, b, c, jg="无语。。。。";
//Console.WriteLine("女神问:“有房子么?”");
//a = Console.ReadLine();

//switch (a)
//{
// case "有":
// Console.WriteLine("女神问:“有车子么?”");
// b = Console.ReadLine();
// switch (b)
// {
// case "有":
// Console.WriteLine("女神问:“有票子么?”");
// c = Console.ReadLine();
// switch (c)
// {
// case "有":
// jg = "我们结婚吧";
// break;
// case "无":
// jg = "抓紧赚钱吧";
// break;
// default:
// break;
// }
// break;
// case "无":
// jg = "等你有了车子再说吧";
// break;
// default:
// break;
// }
// break;
// case "无":

// jg = "房子都没有,别的我就不问了。。。。自己看着办吧。。。。。";
// break;
// default:
// break;
//}
// Console.WriteLine(jg);
// Console.ReadKey();

//int a;
//string x="";
//Console.WriteLine("请选择0-12之内的字");
//a=Convert.ToInt32( Console.ReadLine());
//switch (a)
//{
// case 0:
// x = "选择的是0";
// break;
// case 1:
// x = "选择的是1";
// break;
// case 2:
// x = "选择的是2";
// break;
// case 3:
// x = "选择的是3";
// break;
// case 4:
// x = "选择的是4";
// break;
// case 5:
// x = "选择的是5";
// break;
// case 6:
// x = "选择的是6";
// break;
// case 7:
// x = "选择的是7";
// break;
// case 8:
// x = "选择的是8";
// break;
// case 9:
// x = "选择的是9";
// break;
// case 10:
// x = "选择的是10";
// break;
// case 11:
// x = "选择的是11";
// break;
// case 12:
// x = "选择的是12";
// break;

// default:
// x = "选择的是默认";
// break;
//}
//Console.WriteLine(x);
//Console.ReadKey();

//Random r = new Random();
//string x,y;
//int a=r.Next(0,3);
//int b=r.Next(0,3);

//switch (a)
//{
// case 0://剪刀
// x = "剪刀";
// break;
// case 1://石头
// x = "石头";
// break;
// case 2://布
// x = "布";
// break;
// default:
// x = "耍赖";
// break;
//}
//switch (b)
//{
// case 0://剪刀
// y = "剪刀";
// break;
// case 1://石头
// y = "石头";
// break;
// case 2://布
// y = "布";
// break;
// default:
// y = "耍赖";
// break;
//}

//Console.WriteLine("x出的是"+x);
//Console.WriteLine("y出的是" + y);
//string jg = "";
//if (a==b)
//{
// jg = "平局";
//}
//else if (a>b)
//{
// if (a==2&&b==0)
// {
// jg = "Y胜利";
// }
// else
// {
// jg = "X胜利!";
// }

//}
//else if (b>a)
//{
// if ((b==2&&a==0))
// {
// jg = "X胜利!";
// }
// else
// {
// jg = "Y胜利!";
// }

//}
//if (a==b)
//{
// jg = "平局";
//}
//else if (a>b||(b==2&&a==0))
//{
// jg = "a胜利";
//}
//else if (b>a||(a==2&&b==0))
//{
// jg = "b胜利";
//}

//DateTime d=DateTime.Now;

//while (true)
//{
// if (d.ToShortTimeString() == "12:00")
// {
// Console.WriteLine(d+"该下课了");
// }
// else
// {
// Console.WriteLine(d);
// }

// d = d.AddMinutes(1);
// if (d.ToShortTimeString()=="13:00")
// {
// break;
// }
//}

//while (true)
//{
// DateTime m = DateTime.Now;
// Console.WriteLine(m);
// //TimeSpan time = new TimeSpan(1,1,0,0);

// //m= m.Add(time);
// Console.WriteLine(m.AddHours(3));
// Console.WriteLine(m.AddMonths(1));
// Console.WriteLine(m.AddYears(1));
// Console.WriteLine(m.Date);
// Console.WriteLine(m.DayOfWeek);
// Console.WriteLine(m.Hour);
// Console.WriteLine(m.Month);
// Console.WriteLine(m.TimeOfDay);
// Console.WriteLine(m.Year);
// Console.WriteLine(m.ToShortDateString());

// Console.WriteLine(m.DayOfYear.ToString());

// Console.WriteLine(m);
// Console.Write("是否退出(Y/N)");

// if (Console.ReadLine().ToUpper() == "Y")
// {
// break;
// }

//}

//while (true)
//{
// Console.Write("请输入一个年份");
// string d1 = Console.ReadLine();
// try
// {
// DateTime dt = new DateTime();
// dt = DateTime.Parse(d1+"/2/29");
// Console.WriteLine("闰年");
// }
// catch (Exception)
// {
// Console.WriteLine("不是闰年");

// }

// Console.Write("是否退出(Y/N)");

// if (Console.ReadLine().ToUpper() == "Y")
// {
// break;
// }
//}

int y=9;

for (int i = 1; i <=5; i++)
{
// Console.WriteLine("第"+i+"次循环");
for (int j = 1; j <= 5; j++)
{
if ((i == 3 || j == 3)||(i==1)||(i==5)||(j==1)||(j==5))
{
Console.Write("○");
}
else
{
Console.Write(" ");
}
}
Console.WriteLine();

}

Console.WriteLine("将“HelloWorld”每个字取出,输出大写。");
string str = "HelloWorld";
for (int i = 0; i < str.Length; i++)
{
Console.Write(str.Substring(i, 1).ToUpper()+"\t");
}

Console.ReadLine();

}

}
}

c#基础 第六讲的更多相关文章

  1. HTML基础第六讲---表格

    转自:https://i.cnblogs.com/posts?categoryid=1121494 上一讲,讲了关于<控制表格及其表项的对齐方式>,在这里我要讲讲表格及其属性 ,然后大家在 ...

  2. Linux基础知识第六讲,远程管理ssh操作

    目录 Linux基础知识第六讲,远程管理ssh操作 一丶什么是SSH 1.什么是SSH 2.了解域名跟端口 二丶SSH命令以及远程连接linux进行维护 1.ssh命令格式 2.scp远程终端拷贝文件 ...

  3. 【C++自我精讲】基础系列六 PIMPL模式

    [C++自我精讲]基础系列六 PIMPL模式 0 前言 很实用的一种基础模式. 1 PIMPL解释 PIMPL(Private Implementation 或 Pointer to Implemen ...

  4. Java语言基础(六)

    Java语言基础(六) 前一章提到的, BigDecimal, DecimalFormat等具体用法,这里就不在说了,网上有许多 一.下面让我们看一个例子(自由落体运动位移) 说明: (1).公式是 ...

  5. 32位汇编第六讲,OllyDbg逆向植物大战僵尸,快速定位阳光基址

    32位汇编第六讲,OllyDbg逆向植物大战僵尸,快速定位阳光基址 一丶基址,随机基址的理解 首先,全局变量的地址,我们都知道是固定的,是在PE文件中有保存的 但是高版本有了随机基址,那么要怎么解决这 ...

  6. ros系统21讲—前六讲

    课程介绍(第一讲) linux介绍安装(第二讲) linux的基础操作(第三讲) ROS中语言c++与python介绍(第四讲) 安装ROS系统(第五讲) 第一个: sudo sh -c echo d ...

  7. Bootstrap<基础十六> 导航元素

    Bootstrap 提供的用于定义导航元素的一些选项.它们使用相同的标记和基类 .nav.Bootstrap 也提供了一个用于共享标记和状态的帮助器类.改变修饰的 class,可以在不同的样式间进行切 ...

  8. Stanford机器学习---第六讲. 怎样选择机器学习方法、系统

    原文:http://blog.csdn.net/abcjennifer/article/details/7797502 本栏目(Machine learning)包括单参数的线性回归.多参数的线性回归 ...

  9. 机器学习基石的泛化理论及VC维部分整理(第六讲)

    第六讲 第五讲主要讲了机器学习可能性,两个问题,(1)\(E_{in} 要和 E_{out}\) 有很接近,(2)\(E_{in}\)要足够小. 对于第一个假设,根据Hoefding's Inequa ...

随机推荐

  1. [Jobdu] 题目1493:公约数

    题目描述: 给定两个正整数a,b(1<=a,b<=100000000),计算他们公约数的个数.如给定正整数8和16,他们的公约数有:1.2.4.8,所以输出为4. 输入: 输入包含多组测试 ...

  2. atitit.软件开发--socket框架选型--netty vs mina j

    atitit.软件开发--socket框架选型--netty vs mina j . Netty是由JBOSS提供的一个java开源框架 Apache mina 三.文档比较 mina文档多,,, 好 ...

  3. CShopDialog类

    #ifndef SHOP_H #define SHOP_H #include "XWidget.h" #include "GameConfig.h" class ...

  4. 102. Linked List Cycle【medium】

    Given a linked list, determine if it has a cycle in it.   Example Given -21->10->4->5, tail ...

  5. Proguard语法及常用proguard.cfg代码段

    本文主要ProGuard常用语法.标准proguard.cfg文件内容.常用proguard.cfg代码段及proguard与log level结合解决debug模式日志问题. 1.ProGuard的 ...

  6. 从乌云的错误漏洞分析看Mifare Classic安全

    前言 12年2月初国内著名安全问题反馈平台-乌云发布了有关某公司员工卡的金额效验算法破解的安全问题.从整个漏洞分析来看,漏洞的提交者把员工卡的数据分析得非常仔细,以至很多刚刚接触或者未曾接触的都纷纷赞 ...

  7. Extjs,实现树形结构的总结

    工作总结,用extjs.mybatis.springMVC实现树形显示班级 前台extjs实现树形代码如下: xtype : 'combotree', fieldLabel : '部门名称', nam ...

  8. cocos2dx遇到的一些坑

    针对2.x 1.CCSprite无法直接用文件名更换图片,可以添加如下函数 bool CCSprite::setWithFile(const char *pszFilename) { CCAssert ...

  9. memcached server LRU 深入分析

    Memcached,人所皆知的remote distribute cache(不知道的可以javaeye一下下,或者google一下下,或者baidu一下下,但是鉴于baidu的排名商业味道太浓(从最 ...

  10. Python之美[从菜鸟到高手]--NotImplemented小析

    今天写代码时无意碰到NotImplemented,我一愣.难道是NotImplementedError的胞弟,所以略微研究了一下. NotImplemented故名思议.就是"未实现&quo ...