美文网首页
20181025作业

20181025作业

作者: 楚荷音 | 来源:发表于2018-10-25 10:41 被阅读0次


作业1


20181025作业


代码

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

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int r = 5;
double pi = 3.14;
double perimeter=2pir;
double s = r r pi;

        Console.WriteLine("半径为{0}的圆面积是{1}周长是{2}", r, s, perimeter);
        Console.ReadKey();
    }
}

}


效果

20181025作业


作业2


20181025作业


代码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入你的姓名");
string name = Console.ReadLine();

        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);


        Console.WriteLine("请输入你的英语成绩");
        string str_english = Console.ReadLine();
        int english = Convert.ToInt32(str_english);
        int totol = chinese + math + english;

        double average = totol / 3;

        Console.WriteLine("{0},你的总成绩为{1}分,平均成绩为{2}分", name, totol, average);
        Console.ReadKey();
    }
}

}


效果


20181025作业


作业3


20181025作业


代码

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

namespace ConsoleApp9
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("天数");
int time = Convert.ToInt32(Console.ReadLine());
int week=time/7;
int day = time % 7;
Console.WriteLine("{0}是{1}周又{2}天",time,week,day);
Console.ReadKey();

    }
}

}


效果


20181025作业

相关文章

  • 20181025作业

    …作业1… …代码…using System;using System.Collections.Generic;u...

  • 归元命理(20181025课后作业)振鑫

    归元命理(20181025课后作业)振鑫: 填空题: 1、水曰(润下 ),火曰(炎上 ),木曰(曲直 ),金曰(从...

  • 20181025❤

  • 20181025

    第4 天作业 2018年 10月 25日 一,每天修一条通向成功快乐的思维高速公路 重定意义——好事情 事件: 下...

  • 20181025

    想起今晚给他们上的课文《通往广场的路不止一条》,告诉他们,无论现在的成绩怎么样都不要放弃自己,看见他们抬起头眼睛里...

  • 20181025

    给JH哥哥的坚果零食寄到了。因为《太阳的后裔》里医生熬夜之后剥巴旦木吃,所以想着熬夜的话吃点坚果会不会好一点。JH...

  • 20181025

    雨夜 你的窗外 有人 叼着烟

  • 20181025

    以前学校学得是英音居多,后来看了些美国大片,然后就英美混合,想练美音,必须得将所有的单词发音搞清楚,自己到底发的是...

  • 20181025

    今天和同学一对一开会,找寻初心,看向自己最希冀也最害怕碰触的地方,勇敢地认出自己的理想,下定决心去行动。能够运用上...

  • 20181025

    今天过得很踏实,一整天的工作相当紧凑。早上写了一封长长的总结邮件,自己觉得写得不错,条理清楚信息全面,写完就差不多...

网友评论

      本文标题:20181025作业

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