Sunday 6 January 2019

UMT CGPA CALCULATOR .exe file University of Management and Technology, Lahore

Easy way to calculate your CGPA and SGPA. You don't have to search for UMT CALCULATOR on google every time you want to calculate your gpa by your self and also you don't need an internet connection every time you want to calculate your gpa. Just download the file and run it there is no need to install or waste time on anything.
here are some screenshots attached for the working application.





Sunday 12 June 2016

Insertion Sort Algorithm in C++

for (int i = 0; i < size; i++)
{
int j = i;
while (arr[j - 1]>arr[j])
{
int temp = arr[j - 1];
arr[j - 1] = arr[j];
arr[j] = temp;
j--;
}
}

Thursday 9 June 2016

Library Management system (LMS) using File Handling and Login form without graphics

Before running the code do not forget to create two .txt type files of  name "pass" and "user" save the password in the pass file and username in the user file. Then enter the username and password which you saved in the "pass" and "user" files. Only then you will be able to access the library management system.



 

Tuesday 26 April 2016

Copy one string into another string. Remeber string is an 'char' type array.

#include <iostream>
#include <stdio.h>
using namespace std;

void strcpy(char [],char []);
int main()
{
    char array1[2000],array2[2000];
    cout<<"Enter Your Statement : "<<endl;
    gets(array1);
    cout<<"After Copying the First Statement into The Second the Second Statement Becomes : "<<endl;
    strcpy(array1,array2);
    return 0;
}
void strcpy(char array1[],char array2[])
{
    int i=0;
    while(array1[i]!='\0')
    {
        array2[i]=array1[i];
        i++;
    }
    array2[i]='\0';
    cout<<array2;
}

String.h Library function STRUPR

This function converts the lower case string or statement into upper case statement.
#include <iostream>
#include <stdio.h>
using namespace std;
void strupr(char []);

int main()
{
    char arr[2000];
    cout<<"Enter the statement : "<<endl;
    gets(arr);
    cout<<"After converting small case letter letters into uppercase letters : "<<endl;
    strupr(arr);
    cout<<arr;
    return 0;
}
void strupr(char array[])
{
    int i=0;
    while(array[i]!='\0')
    {
        if(array[i]>='a' && array[i]<='z')
        {
            array[i]=array[i]-32;
        }
        i++;
    }
}

Transpose of a Matrix using C++

#include <iostream>
using namespace std;
int main()
{
    int array[3][3],trans[3][3],i,j;
    for(i=0; i<3; ++i)
    for(j=0; j<3; ++j)
    {
        cout << "Enter elements a" << i+1 << j+1 << ": ";
        cin >> array[i][j];
    }
    cout << endl << "Entered Matrix: " << endl;
    for(i=0; i<3; ++i)
    for(j=0; j<3; ++j)
    {
        cout << " " << array[i][j];
        if(j==3-1)
            cout << endl << endl;
    }

    for(i=0; i<3; ++i)
    for(j=0; j<3; ++j)
    {
       trans[j][i]=array[i][j];
    }

    cout << endl << "Transpose of Matrix: " << endl;
    for(i=0; i<3; ++i)
    for(j=0; j<3; ++j)
    {
        cout << " " << trans[i][j];
        if(j==3-1)
            cout << endl << endl;
    }
    return 0;
}