Professional Documents
Culture Documents
LAB 9
TASK1:
#include<iostream>
struct book_data {
int ISBN;
string book_name;
float book_pr;
};
int main() {
book[0].book_pr = 1300;
getline(cin, book[i].book_name);
return 0;
TASK 2:
#include <iostream>
#include <string>
struct Student_Data {
int Roll_No;
string Name;
float Marks;
};
int main() {
Student_Data students[numStudents];
cout << "Enter Roll No for Student " << i + 1 << ": ";
cout << "Enter Name for Student " << i + 1 << ": ";
getline(cin, students[i].Name);
cout << "Enter Marks for Student " << i + 1 << ": ";
displayStudentData(students[i]);
return 0;
Task 3:
#include <iostream>
#include <string>
struct Employee {
int ID;
string Name;
double Salary;
};
int main() {
Employee emp;
getline(cin, emp.Name);
return 0;