tart here X assign cpp X
1 #1nclude <iost team
3
$1ncludestI1ng
usi ng namespace std:
4 struct StudentRec
5
string name
7 int Rollno:
float attende ceperC:
char Grade:
10
13 1nt a1n
15 stract StudentRec sl:
struct StudentRec s2:
17 struct StudentRec s3:
struct StudentRec s4:
19 [Link]="sIavan":
[Link]=-:
[Link]=e:
[Link]:
23
24 [Link]="Pavan":
25 s2.Rollno2:
2¬ [Link]él:
27 [Link]:
29
29 [Link]="ravan":
30 [Link] lno=3:
31
[Link]é0:
32 [Link]:
33
34 [Link]":
35 [Link]-4:
3¬
[Link]-100:
37 s$.Grade:
32 cout Deta1ls of first student"<endl:
39 [Link]:
40 [Link]<endl:
41 COut9l.atLendeceperCend1 :
42 cout«[Link]:
43
44 cout<"Details of second student"< endl:
45 cout92.naeend1:
cout<<[Link] :
47 cout<< [Link]!:
48 cout<<[Link]:
20
[Link] 1:
21
22
[Link] ceperce:
[Link]:
23
24
[Link]-"Pavan":
25 [Link]-2:
26
27
92.attendeceperc0:
[Link] a d e :
29
[Link]"Kravan" :
30 [Link] 3:
31
32
93.attendeceperce0:
[Link]':
33
34 [Link] "ABHI":
35 s4.Rollno4:
3¬
[Link] 100:
37 [Link]-:
38 cout<"Details cof first student"<<endl:
39 cout<<[Link]<<endl:
40
Cout<[Link]<<endl:
41
42
cout<<[Link]<<endl:
cout<<[Link]<<endl:
43
44 cout<<"Details of second student "<<endl:
45 COut<<[Link]<<endl:
CODt<[Link]<<endl:
47
cout<<[Link]<cendl:
Cout [Link]<<endl:
49
50 coat<<" Details of third student"<<endl;
CODt [Link]<endl:
52 Cout<<[Link]<<endl:
53 cout<[Link]<endl:
54 Cout<[Link]:
cOutDetails of forth student"<<endl:
Cout<[Link]<endl:
[Link]<endl:
[Link]<<endl:
60 cOut<[Link]:
¬2
return :
Hes
Details of first student
sravan
1
60
A
Details of second student
Pavan
2
60
A
Details of third student
Kravan
3
60
A
Details of forth student
ABHI
4
A
execution ti me: 0.078 s
Process returned e (exe)
Press any key to continue..
activate Settings
to to Go EnrolNloc<endl; <«Í«student[1]. COut<eenrollment
no 32
Windows Activate i-;iM;i+){ for(int 31
30
N)
int student
[], (StudentRec print void 29
28
27
26
cout<«student[3]
.CGPAK<" 25
j-e;jaN;
j+) for(int 24
23
22
21
20
19
18
tep; []
-student L7
student[1]: student[1]
- 16
15
[1);student StudentRec
temp 14
.cPA).cGPAKstudent
[1] if(student[3] 13
-i+1;jN;j+){ for(intJ 12
1-9;1M-1;1+){ (int for 11
student[0,
N){ int (StudentRec sort void 10
branch; string
CGPA; float
6
EnrolNo; int
Rec{Student struct
std;
namespace using
#includecstring>
include<iostream>
[Link] &
Gacpp >main
29 void print (StudentRec student [], int N){
33 cOut<<"CGPA OF " <«i«student [1] .cGPA<Kendl;
34
cout<<"Branch of <<i««student[].branch<<endl;
35 }
3 return;
37
38 int sain()
39 int N-3;
40 StudentRec student [N];
41 student [e].EnrolNo 1;
47 student[e] .CGPA - 10;
43 student[O].branch - "cSE";
44
45 student [1]. EnrolNo2;
46
student [1].cGPA 9.9;
47
student[1].branch - "AIDS";
48
49 student[2] .EnrolNo- 3;
50 student [2].cGPA - 9.8;
51 student [2].branch - "ECE";
$2
53 cout<<"data unsorted";
54 print (student, N);
55 cout<<"data sort";
56
sort(student, N);
57
58 return e;
59
PROBLEMS OUTPUT DEBUG CONSOLE TERMNNAL. PORTS Code t 0
PS C:\Wsers\ShreeDesktop\CoDE HARRY cd "c:Users\ShreeDesktop\CoDE HAen ; if ($?) { Gt [Link] -o a}; if ($) { )
data unsortedenollent no 01
CGPA OF 09.88
Branch of eCSE
enrolinent no 12
CGPA OF 19.9
Branch of 1AIDS
enrollent no23
CGPA OF 29.8
Branch of 2£CE
data sort9.88 9.9 9.9
PS C: Users\Shree \Desktop\C0DE HARRY>
[Link]
G [Link] G [Link]
[Link]
[Link]
G bpp -
includeciostreaD
1
using namespace std;
2
struct Tine{
int hours;
int inutes;
5
int seconds:
void setTie(Tie &t){
cout<«"ENTER THE hour":
cin>>[Link];
1 cout<<"Enter the dnutes:
11
12
cin)>[Link];
COut<<"enter the seconds":
13
cin>>[Link];
14
15 return
16
17 displayTime (Time &t){
void cout<[Link]<<":;
18
cout<[Link]<¢:;
19
2¬
cout<[Link]<«*:";
21 return;
22
23
24 int main(0{
25 Tie t ;
26 setTine(t);
27 displayTne (t) ;
28 rturn 8;
29
Hle Edt Seiection View Go Run ** P cODE HARRY
EXPLORER PROBLEMS OUTPUT DEBUG CONSOLE TERMINA PORTS
> OPEN EDITORS
Ov oDE HARRY PS C:Wsers\shreDesktop\CDE
hour
HARRY d c:Uers\hrelDesktop\CIDE ARRYN ; if ($) ( B [Link] -o b): if (s
inutes6
E [Link] enter the serondss
& ap1614<pp [Link]
E apl614exe PS C:Users\Shree\Desktop\CODE HARRY>
G [Link]
[Link]
G assign62.4pp
[Link]
G assingn4cpp
[Link]
Cbpp
[Link]
G faccpP
Facexe