20181024作业

2018-10-24  本文已影响0人  楚荷音


作业1


20181024作业


代码

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

namespace ConsoleApp7
{
class Program
{
static void Main(string[] args)
{
int number1 = 10;
int number2 = 5;
Console.WriteLine("number1="+number1+"number2="+number2);
int sum = number1 + number2;
number2 = number1+number2;
number1 = number2-number1;
number2 = number2 - number1;
Console.WriteLine("number1="+number1+"number2="+number2);
Console.ReadKey();

    }
}

}

效果


20181024作业


作业2


20181024作业


代码

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

namespace ConsoleApp6
{
class Program
{
static void Main(string[] args)
{
string name = "胡小雨";
int age=18;
char gender = '女';
Console.WriteLine("您好:{0}您的年龄是{1},是个{2}生",name, age, gender);
Console.ReadKey();

    }
}

}


效果


20181024作业

上一篇 下一篇

猜你喜欢

热点阅读