2013년 2월 28일 목요일
Code C#: Giải phương trình bậc nhất (Console)
Posted By:
Unknown
on 오전 1:40
using System;
namespace PhuongTrinhBacNhat{
class Program {
static void Main(string[] args) {
Console.Write("Nhap he so a :");
int a = int.Parse(Console.ReadLine());
Console.Write("Nhap he so b :");
int b = int.Parse(Console.ReadLine());
if (a == 0)
if (b == 0)
Console.WriteLine("Phuong trinh co vo so nghiem");
else
Console.WriteLine("Phuong trinh vo nghiem ");
else{
int ketqua = -b / a;
Console.WriteLine("Phuong trinh co nghiem la x = {0}",
ketqua.ToString());
}
Console.ReadKey();
}
}
}
피드 구독하기:
댓글 (Atom)
0 개의 댓글:
댓글 쓰기