Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Quản lý điểm sinh viên tuần trước nữa !

Go down

Quản lý điểm sinh viên tuần trước nữa ! Empty Quản lý điểm sinh viên tuần trước nữa !

Bài gửi by khongxacdinh 9/10/2009, 22:24

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
khongxacdinh
khongxacdinh
Cống hiến
Cống hiến

Tổng số bài gửi : 163
Join date : 18/09/2009
Đến từ : GoogleMap

http://tourvn24h.com, k8t11.tk

Về Đầu Trang Go down

Về Đầu Trang


 
Permissions in this forum:
Bạn không có quyền trả lời bài viết