Quản lý điểm sinh viên tuần trước nữa !
:: Góc Học Tập :: Cơ Sở Lập Trình
Trang 1 trong tổng số 1 trang
Quản lý điểm sinh viên tuần trước nữa !
Rảnh rổi up lên cho bà con có dịp nghiên cứu !
using System;
using System.Collections.Generic;
using System.Text;
namespace quanlysinhvien
{
class Program
{
static void Main(string[] args)
{
int a;
int b;
Console.WriteLine("Nhap vao so sinh vien");
a=Int32.Parse (Console.ReadLine());
Console.WriteLine ("nhap vao so mon hoc");
b = Int32.Parse(Console.ReadLine());
double [,] diem = new double [a,b+1];
string[] ten = new string[a];
for (int i=0;i<a; i++)
{
Console.WriteLine("Nhap ten cua hoc sinh thu {0}",i+1);
ten[i]=Console.ReadLine();
double tam = 0;
for (int j = 0; j < b; j++)
{
Console.WriteLine("Nhap diem mon {0}", j + 1);
diem[i,j]=float.Parse(Console.ReadLine());
tam = tam + diem[i, j];
}
diem[i, b] = tam / b;
}
Console.WriteLine("-------KET QUA---------");
for (int i = 0; i < a; i++)
{
Console.WriteLine("Hoc sinh ten {0} co diem la: ", ten[i]);
for (int j = 0; j < b; j++)
{
Console.Write("- Diem mon {0} la: ",j+1);
Console.WriteLine ("{0}", diem[i, j]);
}
Console.WriteLine("+ Diem trung binh la {0}",diem[i,b]);
}
Console.ReadLine();
}
}
}
Link nè nhớ chuột phải save target as nhà , click vào chỉ thấy code mệt người !
http://tourvn24h.com/khongxacdinh/quanlysinhvien.cs
using System;
using System.Collections.Generic;
using System.Text;
namespace quanlysinhvien
{
class Program
{
static void Main(string[] args)
{
int a;
int b;
Console.WriteLine("Nhap vao so sinh vien");
a=Int32.Parse (Console.ReadLine());
Console.WriteLine ("nhap vao so mon hoc");
b = Int32.Parse(Console.ReadLine());
double [,] diem = new double [a,b+1];
string[] ten = new string[a];
for (int i=0;i<a; i++)
{
Console.WriteLine("Nhap ten cua hoc sinh thu {0}",i+1);
ten[i]=Console.ReadLine();
double tam = 0;
for (int j = 0; j < b; j++)
{
Console.WriteLine("Nhap diem mon {0}", j + 1);
diem[i,j]=float.Parse(Console.ReadLine());
tam = tam + diem[i, j];
}
diem[i, b] = tam / b;
}
Console.WriteLine("-------KET QUA---------");
for (int i = 0; i < a; i++)
{
Console.WriteLine("Hoc sinh ten {0} co diem la: ", ten[i]);
for (int j = 0; j < b; j++)
{
Console.Write("- Diem mon {0} la: ",j+1);
Console.WriteLine ("{0}", diem[i, j]);
}
Console.WriteLine("+ Diem trung binh la {0}",diem[i,b]);
}
Console.ReadLine();
}
}
}
Link nè nhớ chuột phải save target as nhà , click vào chỉ thấy code mệt người !
http://tourvn24h.com/khongxacdinh/quanlysinhvien.cs
:: Góc Học Tập :: Cơ Sở Lập Trình
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|
10/12/2020, 01:06 by Ti3uThucodon93
» Tiểu thuyết : Yêu anh là sai lầm của cuộc đời em
24/2/2019, 11:49 by Ti3uThucodon93
» Tiểu thuyết : Yêu sai thời điểm
23/2/2019, 16:39 by Ti3uThucodon93
» Thơ Trung Quốc !
15/10/2018, 10:05 by Ti3uThucodon93
» Câu nói hay !
22/1/2017, 15:59 by Ti3uThucodon93
» Thơ tình dài !
15/11/2016, 11:45 by Ti3uThucodon93
» Thơ 4 câu !
1/9/2016, 16:14 by Ti3uThucodon93
» Thơ hài hước !
9/8/2016, 09:04 by Ti3uThucodon93
» Cách chữa trị bệnh hôi nách dành cho sinh viên
30/7/2016, 16:02 by thammybacsihathanh