Posts

Operation on Matrix

Image
Program #include<iostream> #include<windows.h> #include<stdio.h> #include<conio.h> using namespace std; int a,b,c,d,sum1,sum2; int entering(); class Dynamic{ public: int **m1,**m2,**sum,**sub,**mul; int Matrix1(int row,int colum); int Matrix2(int row,int colum); int Addition(int row,int colum); int substraction(int row,int colum); int multiplication(int row,int colum,int row1,int colum1); int transpose(int row,int colum,int row1,int colum1); int Displaym1(int row,int colum); int Displaym2(int row,int colum); }; Dynamic ss; int menu(){ system("cls"); int choice; cout<<"\n\n\t\t\t\t**************Lab Task**************"<<endl;    cout<<"\t\t*********************************************************************"<<endl;    cout<<"\t\t\t\t\t\tOperation Menu"<<endl;    cout<<"\t\t****************************************************...

Linked List(single)

Image
Linked List(single) Code:(simple creating nodes and display it) #include <iostream> using namespace std; struct node {     int data;     node *next; }; class linked_list { private:     node *head,*tail; public:     linked_list()     {         head = NULL;         tail = NULL;     }     void add_node(int n)     {         node *tmp = new node;         tmp->data = n;         tmp->next = NULL;         if(head == NULL)         {             head = tmp;             tail = tmp;         }         else         {             tail->next = tmp; ...

Lab Task

Image
Program //*screen Buffer size   width 101    height 9008 window size            width 101    height 30*/ #include<iostream> #include<windows.h> #include<stdio.h> #include<conio.h> using namespace std;  void gotoxy(short x, short y){  HANDLE Manipulador;  COORD Coordenadas;  Manipulador=GetStdHandle(STD_OUTPUT_HANDLE);  Coordenadas.X=x;  Coordenadas.Y=y; SetConsoleCursorPosition(Manipulador,Coordenadas); } int menu(); int sum=0,g=1,kk,hh=1; class Labtask{  public:   int a[10]={1,2,3,4,5,6,7,8,9,10},value[10],sort[10];   float b[10];   void Q1(){    cout<<"\n\nThe output in tabular form :"<<endl;    for(int i=0;i<10;i++){     cout<<a[i];     cout<<endl;    }   }   int Q2(float d);   int Q3();   int Q4();   ...

online earning

https://ckk.ai/1ScA ttps://ckk.ai/1ScA link 2 https://ckk.ai/9GXGhU link

class work

Image
Program#1   #include<iostream> #include<windows.h> #include<cstring> #include "untitled2.cpp" using namespace std; class education; class person { protected: string name; string cnic; string dob; public: void getdata() { cout<<"enter name"; cin>>name; cout<<"enter cnic"; cin>>cnic; cout<<"enter DOB"; cin>>dob; } void display() { cout<<"name= "<<name; cout<<"cnic= "<<cnic; cout<<"date of birth= "<<dob; } }; class education{ string dname; int year; float cgpa; public: void getdata() { cout<<"enter degree";cin>>dname; cout<<"enter year";cin>>year; cout<<"Cgpa";cin>>cgpa; } void display() { cout<<"\nDegree="<<dname; co...

Projects

Image
Library Management System #include<stdlib.h> #include<iostream.h> #include<string.h> #define MAX    100 class bookEntry{ public:     int copies;     char name[30];     char author[30]; }; class library{ public:     int numBooks;     bookEntry database[MAX];     library(){         numBooks = 0;     }     void insertBook( char bookName[], char author[], int c);     void deleteBook( char bookName[]);     bookEntry *search( char bookName[]); }; void library::insertBook( char bookName[], char author[], int c){     strcpy( database[numBooks].name, bookName);     strcpy( database[numBooks].author, author);     database[numBooks].copies = c;     cout << "Book Inserted Successfully.\n";     ++numBooks; } void library::deleteBook( char bookName[]){  ...

PROGRAMMING USING CLASS

Image
Program #include <iostream> #include <string> #include<windows.h> using namespace std; int g=1,l,f=4,n=0; float sum=0; class Student {    int con,sem;     char name[50],DOB[50],section[50]; float gpa; public: void getName() { cin.ignore(); cin.getline(name,50); } void getgpa() { cin >> gpa; } void getDOB() { cin.ignore(); cin.getline(DOB,50); } void getsec() { cin >> section; } void getcon() { cin >> con; } void getsem() { cin >>sem; } void getdata(int k){ cout<<k<<"\t\t"<<name<<"\t\t"<<con<<"\t\t"<<sem<<"\t\t"<<section<<"\t\t"<<gpa<<"\t\t"<<DOB<<endl; } void displayAll() { cout << "Name : " << name << endl; cout << "GPA : " <...