美文网首页
第四次作业第一题

第四次作业第一题

作者: 皮皮虾_98e9 | 来源:发表于2018-10-31 14:38 被阅读0次

代码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
/**
* 老苏的语文和数学有一门是否大于90分
* */
Console.WriteLine("请输入老苏的语文成绩:");
string str_chinese = Console.ReadLine();
int chinese = Convert.ToInt32(str_chinese);
Console.WriteLine("请输入老苏的数学成绩:");
string str_math = Console.ReadLine();
int math = Convert.ToInt32(str_math);
bool b = chinese > 90 || math > 90;
Console.WriteLine("老苏的语文和数学成绩有一门大于90:{0}", b);
Console.ReadKey();

    }

效果

IMG_0100.JPG

相关文章

网友评论

      本文标题:第四次作业第一题

      本文链接:https://www.haomeiwen.com/subject/sidatqtx.html