-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscan.c
More file actions
67 lines (67 loc) · 1.78 KB
/
scan.c
File metadata and controls
67 lines (67 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*#include <stdio.h>
#include <time.h>
#include <string.h>*/
typedef struct tm tm;
struct Student
{
char Name[50];
char Surname[30];
char Nickname[15];
char Gender[10];
char Nationality[20];
char State[40];
char collegeName[50];
char currentLocation[50];
char Grade;
char Department[40];
char D_O_B[12];
char marital_status[10];
int Age;
double Cgpa;
char Email[27];
char check[28];
};
/*void scan();
int main(){
scan();
return 0;
}*/
struct Student info;
void scan()
{
time_t currentTime;
time(¤tTime);
//printf("%s", info.check);
tm *myTime = localtime(¤tTime);
//strcpy(info.check, ctime(¤tTime));
//printf("Enter your Name: \n");
//scanf("%s", info.Name);
//strcpy(info.Email, "agunbiadebasit17@yahoo.com");
//printf("%s", info.check);
//printf("Enter your Surname: \n");
//scanf("%s", info.Surname);
printf("Enter your Gender: \n");
scanf("%s", info.Gender);
//printf("Enter y our D_O_B: \n");
//scanf("%s", info.D_O_B);
//printf("Enter your age: \n");
//scanf("%d", &info.Age);
//printf("Enter your Nickname: \n");
//scanf("%s", info.Nickname);
/*printf("Enter your current-location: \n");
scanf("%s", info.currentLocation);
printf("Enter your Nationality: \n");
scanf("%s", info.Nationality);
printf("Enter your State: \n");
scanf("%s", info.State);*/
printf("Enter your Marital-Status: \n");
scanf("%s", info.marital_status);
/*printf("Enter your college-name: \n");
scanf("%s", info.collegeName);
printf("Enter your Department: \n");
scanf("%s", info.Department);*/
printf("Enter your Cgpa: \n");
scanf("%lf", &info.Cgpa);
printf("Enter your grade: \n");
scanf(" %c", &info.Grade);
}