C#学习记录
来源:互联网 发布:linux 解压tar 编辑:程序博客网 时间:2024/05/20 20:02
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter an integer:"); //控制台显示的字段
int myInt = Convert.ToInt32(Console.ReadLine());//转格式
bool isLessThan10 = myInt < 10;
bool isBetween0And5 = (0 <= myInt) && (myInt <= 5); //声明布尔变量并赋值
Console.WriteLine("Integer less than 10?{0}", isLessThan10);
Console.WriteLine("Integer between 0 and 5?{0}", isBetween0And5);
Console.WriteLine("Exactly one of the above is ture?{0}", isLessThan10 ^ isBetween0And5);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter an integer:"); //控制台显示的字段
int myInt = Convert.ToInt32(Console.ReadLine());//转格式
bool isLessThan10 = myInt < 10;
bool isBetween0And5 = (0 <= myInt) && (myInt <= 5); //声明布尔变量并赋值
Console.WriteLine("Integer less than 10?{0}", isLessThan10);
Console.WriteLine("Integer between 0 and 5?{0}", isBetween0And5);
Console.WriteLine("Exactly one of the above is ture?{0}", isLessThan10 ^ isBetween0And5);
Console.ReadKey();
}
}
}
0 0
- c#学习记录
- C# 泛性 学习记录
- c#事件 学习记录
- C#学习记录
- C#学习记录
- C#学习记录------------ADHelper
- C#的学习记录
- C#学习记录
- C#学习记录
- C#学习记录
- C#学习记录
- C#学习记录
- C#的学习记录
- C#入门学习记录
- C#学习记录
- C#学习问题记录
- C#学习记录:委托
- C#学习日常记录
- 关于GROUP_CONCAT的用法
- iOS8开发~Swift 理解?和!
- DataGridView 点击修改单元格的值
- 2014年TI杯大学生电子设计竞赛地区赛使用仪器及器件、设备
- 倒计时的数字时钟
- C#学习记录
- 黑马程序员之java学习笔记14
- 如何锁定一个.net,DLL
- Spring笔记(3)-----ApplicationContext相关
- android开发中如何结束所有的activity
- jQuery幻灯插件:Nivo Slider
- hdu 1250 Hat's Fibonacci
- [转]Android内存之VSS/RSS/PSS/USS
- Android滑动菜单