You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
struct course //先定义两个结构体^_^,一个是课程信息,另外一个是学生选课的结构图。
{
int num ; //课程编号
char name [ 20 ] ; //课程名称
char kind [ 10 ] ; //课程性质
int time ; //总学时
int ttime ; //授课学时
int etime ; //实验上级学时
int mark ; //学分
int term ; //学期
} ;
struct student
{
int snum ; //学号
int cnum ; //课程编号
char cname [ 20 ] ; //课程名称
} ;
int main ( void ) //登录界面
{
int a , b , c = 123 , d = 123 ;
printf ( " 请输入本程序防盗安全账号密码登录系统(防盗安全账号、密码为123); \n " ) ; //虽然没啥用
printf ( " 账号; " ) ;
scanf ( " %d " , & a ) ;
printf ( " \n " ) ;
printf ( " 密码; " ) ;
scanf ( " %d " , & b ) ;
printf ( " \n " ) ;
while ( a ! = c )
{
printf ( " 账号错误!请重新输入! \n 账号; " ) ;
scanf ( " %d " , & a ) ;
}
while ( b ! = d )
{
printf ( " 密码错误!请重新输入! \n 密码; " ) ;
scanf ( " %d " , & b ) ;
}
printf ( " 登录成功^_^ \n " ) ;
system ( " cls " ) ; //清屏
mai_n ( ) ; //主菜单
return 0 ;
}