Skip to content
  • 0 Votes
    4 Posts
    1k Views
    zaasmiZ
    // CS201 Assignment 2 Solution Spring 2021 #include <iostream> #include <conio.h> using namespace std; int ShowMatrix() { //main matrix int row=2, column=2; int matrix[2][2] = { {8, -4} , {-6, 2} }; cout<<"The matrix is:"<<endl; for(int i=0; i<row; ++i) { for(int j=0; j<column; ++j) cout<<matrix[i][j]<<" "; cout<<endl; } } //Transpose int showTranspose ( ) { int transpose[2][2], row=2, column=2, i, j; int matrix[2][2] = { {8, -4} , {-6, 2} }; cout<<endl; for(i=0; i<row; ++i) for(j=0; j<column; ++j) { transpose[j][i] = matrix[i][j]; } cout<<"The transpose of the matrix is:"<<endl; for(i=0; i<column; ++i) { for(j=0; j<row; ++j) cout<<transpose[i][j]<<" "; cout<<endl; } } //determenent calculating int calculateDeterminant() { int determMatrix[2][2], determinant; int matrix[2][2] = { {8, -4} , {-6, 2} }; determinant = ((matrix[0][0] * matrix[1][1]) - (matrix[0][1] * matrix[1][0])); cout << "\nThe Determinant of 2 * 2 Matrix = " << determinant; } //Adjoint of matrix int showAdjoint() { int ch,A2[2][2] = {{8,-4},{-6,2}},AD2[2][2],C2[2][2]; //Calculating co-factors of matrix of order 2x2 C2[0][0]=A2[1][1]; C2[0][1]=-A2[1][0]; C2[1][0]=-A2[0][1]; C2[1][1]=A2[0][0]; //calculating ad-joint of matrix of order 2x2 AD2[0][0]=C2[0][0]; AD2[0][1]=C2[1][0]; AD2[1][0]=C2[0][1]; AD2[1][1]=C2[1][1]; cout<<"\n\nAdjoint of A is :- \n\n"; cout<<"|\t"<<AD2[0][0]<<"\t"<<AD2[0][1]<<"\t|\n|\t"<<AD2[1][0]<<"\t"<<AD2[1][1]<<"\t|\n"; } int main() { int cho = 0; cout<<" ||---Enter your choice---||"<<endl; cout<<""<<endl; cout<<"---Press 1 to display the matrix and its transpose---"<<endl; cout<<"---Press 2 to find adjoint and determinant of the matrix---"<<endl; cout<<""<<endl; cout<<"Press any other key to exit."; cout<<""<<endl; cin>>cho; if (cho ==1) { ShowMatrix(); showTranspose ( ); } else if (cho == 2) { showAdjoint(); calculateDeterminant(); } else system("pause"); }
  • 0 Votes
    1 Posts
    165 Views
    No one has replied
  • 0 Votes
    2 Posts
    135 Views
    zaasmiZ

    Check and join group for solution!
    https://chat.cyberian.pk/chat/group/48/

  • 0 Votes
    7 Posts
    559 Views
    cyberianC

  • 0 Votes
    3 Posts
    264 Views
    zaasmiZ

    Solution:1 847702ca-b2f8-47e1-bc50-67e732da2334-image.png

    Solution:2 ffc7a7af-70d3-453d-9f0b-a5de6696e77d-image.png

  • 0 Votes
    3 Posts
    1k Views
    zaasmiZ

  • 0 Votes
    1 Posts
    150 Views
    No one has replied
  • 0 Votes
    5 Posts
    987 Views
    Tahera IrumT

    ANSWER’S:
    His prophet hood is universal:

    EXPLANATION:
    Hazrat Muhammad (PBUH) is the last Prophet means that his Prophet Hood is universal. He was the best example for the the world .His Prophet hood is sufficient for all humanity up to the end of this world. He is not the prophet of his age but he is the Prophet of every age.

     “In God’s messenger you have indeed a good example for everyone who looks forward with hope to God and the Last Day …”
     "Say: Obey Allah and obey the Messenger, … If you obey him, you shall be on the right guidance”

    He is seal of prophet hood:

    EXPLANATION:
    Hazrat Muhammad (s.a.w) is the last prophet of Allah Almighty, Quran is last truth book. The Holy Prophet is seal of Prophet Hood .Allah called the Holy Prophet is Khata-mun-nabyeen. No one Prophet will come after the Prophet (s.a.w).
     “Muhammad is not the father of any of your men,1 but is the Messenger of Allah and the seal of the prophets”
    Deen is completed upon him:
    EXPLANATION:
    As you know that the Holy Prophet (s.a.w) is the last divine Prophet of Allah .No one is comes after the Mustafa (s.a.w).
    Deen is completed upon him. If we want to be a successful person in our both lives (In the world and at the Judgment day)we ought to obey the Holy Prophet(s.a.w)’s firmaans and AHADEES .Because of the deen –e- islam is the Deen of Allah and Mustafa (s.a.w).

     “SAY, ALLAH IS ONE /ALONE AND MUHAMMAD (S.A.W) IS THE LAST DIVINE PROPHET OF ALLAH ALLMIGHTY”

    It is known by necessity that the Deen of Islam is complete, as Allah, the Exalted, says:
     “This day, I have perfected your Deen for you, completed My Favor upon you, and have chosen for you Islam as your Deen.” (Sarah Al-Ma’idah,) 5:3

    A position of praise and glory will be granted to him on the Day of Resurrection:

    EXPLANATION:

     ON the day of resurrection a position of praise and glory will be granted to Mustafa (s.a.w).
     Allah creates the world just for the praise of Mustafa (s.a.w),
     On the day of Judgement HE will be the cause of intercession.

    MUHAMMAD (S.A.W) SAYS:
     “The banner of praise will be in my hand on the Day of Resurrection”,

     All of creation will praise Muhammad for that status on the Day of Judgment! … so that He will start to judge between His slaves, and no one will be granted this except Muhammad (peace and blessings of Allah be upon him.

     “This is what the Beneficent (Allah) had promised, and the Messengers did speak the truth.”
    .
     “And that the Hour (of Resurrection) is coming, there is no doubt therein; and that Allah will raise up those in the graves.” (Qur’an, 22:1-7

  • 0 Votes
    3 Posts
    583 Views
    wajiha AsifW
    Solution://Header Files #include<stdio.H> #include<DOS.H> #include<BIOS.H> void interrupt (*oldint65)(); //To store current interrupt char far *scr=(char far* ) 0xb8000000; void interrupt newint65();//NewInt prototype void main() { oldint65 = getvect(0x65); setvect(0x65, newint65); getch(); keep(0, 1000); } void interrupt newint65() {clrscr(); *scr=8; (*scr)=0x174D; (*(scr+2))=0x1743; (*(scr+4))=0x1731; (*(scr+6))=0x1739; (*(scr+8))=0x1730; (*(scr+10))=0x1734; (*(scr+12))=0x1730; (*(scr+14))=0x1736; (*(scr+16))=0x1734; (*(scr+18))=0x1730; (*(scr+20))=0x1734; }

    429e7ece-92cc-4cef-a09c-e90f8b391518-image.png
    3e679fbc-5b4c-4ac1-a4c8-107d83737325-image.png

  • 0 Votes
    2 Posts
    267 Views
    zaasmiZ

    @zaasmi said in CS402 Assignment 1 Solution and Discussion:

    Re: CS402 Assignment 1 Solution and Discussion

    Please share CS402 Assignment 1 Fall 2020

    Theory of Automata (CS402)

    Assignment # 01

    Fall 2020

    Total marks = 20 30th November, 2020

    Please carefully read the following instructions before attempting assignment.

    RULES FOR MARKING

    It should be clear that your assignment would not get any credit if:

    The assignment is submitted after the due date.
    The submitted assignment does not open or file is corrupt.
    Strict action will be taken if submitted solution is copied from any other student or from the internet.

    You should concern the recommended books to clarify your concepts as handouts are not sufficient.

    You are supposed to submit your assignment in .doc or docx format.

    Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.

    Topic Covered:

    Objective of this assignment is to assess the understanding of students about:

    · The concept of languages

    · Regular Expressions

    · Finite automata.

    NOTE

    No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

    If you people find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.

    For any query, feel free to email at:

    [email protected]

    Questions No 01 Marks (10)

    Construct a FA which recognizes the set of all strings defined over ∑= {0, 1} ending with the suffix ‘10’. Also draw transition table for that language.

    Questions No 02 Marks (10)

    Identify the language L accepted by the following regular expression abab(a + b)*. Also define the recursive definition of that language.
    Which of the following string(s) is/are part of language L defined as above?
    baaba
    aabaa
    abbbab
    babaa

  • 0 Votes
    3 Posts
    1k Views
    zareenZ

    @zareen said in CS101 Assignment 1 Solution and Discussion Fall 2020:

    decimal numbers into equivalent binary numbers and then convert the binary

  • 0 Votes
    3 Posts
    1k Views
    zaasmiZ

    @zareen said in MTH603 Assignment 1 Solution and Discussion:

    Question #2: Solve the system of linear equations with the help of Gaussian elimination method.
    2x + y + z = 9;3x −2y + 4z = 9;x +y-2z = 3

    System of Linear Equations entered :

    [1] 2x + y + z = 9
    [2] 3x - 2y + 4z = 9
    [3] x + y - 2z = 3

    Solve by Substitution :

    // Solve equation [3] for the variable y

    [3] y = -x + 2z + 3

    // Plug this in for variable y in equation [1]

    [1] 2x + (-x +2z+3) + z = 9
    [1] x + 3z = 6
    // Plug this in for variable y in equation [2]

    [2] 3x - 2•(-x +2z+3) + 4z = 9
    [2] 5x = 15
    // Solve equation [2] for the variable x

    [2] 5x = 15

    [2] x = 3
    // Plug this in for variable x in equation [1]

    [1] (3) + 3z = 6
    [1] 3z = 3
    // Solve equation [1] for the variable z

    [1] 3z = 3

    [1] z = 1
    // By now we know this much :

    x = 3
    y = -x+2z+3
    z = 1
    // Use the x and z values to solve for y
    y = -(3)+2(1)+3 = 2

    Solution :
    {x,y,z} = {3,2,1}

  • 0 Votes
    1 Posts
    198 Views
    No one has replied
  • 0 Votes
    1 Posts
    723 Views
    No one has replied
  • 0 Votes
    2 Posts
    239 Views
    zaasmiZ

    Last date

  • 0 Votes
    7 Posts
    196 Views
    cyberianC

    @zaasmi said in Final Exam (Take Home) Spring - 2020 Department of Media Science:

    (b) Case # 2:
    At the same time, in a country like Pakistan unbranded milk (dairy shops) dominates the market with 90% Market share meaning they do not have the attitude to go for branded milk. if haleeb wants to advertise, what advertising strategy would you suggest throughout the year & why. Restrict your answer in maximum 4 lines
    (5 Marks)

    Link Solution