面向对象程序设计(C_)第03章_结构化程序设计研讨
第3章 结构化程序设计;1、语句概述;C语言程序设计 - 第3章 顺序结构程序设计;C语言程序设计 - 第3章 顺序结构程序设计;2、顺序结构程序设计;C语言程序设计 - 第3章 顺序结构程序设计;3、选择结构程序设计;举例;C#程序设计 - 第3章 结构化程序设计;C#程序设计 - 第3章 结构化程序设计;形式三:; ;if ~ else 配对原则:缺省{ }时,else总是和它上面离它最近的未配对的if配对;2)switch语句;例:已知个人总收入,求应纳税额(用switch)。;using System;
namespace Sample04
{
class Program
{
static void Main(string[] args)
{
double income, tax;
int c;
Console.WriteLine(Input income:);
income = double.Parse(Console.ReadLine());
c = (int)(income / 200);; switch (c)
{
case 0: cas
原创力文档

文档评论(0)