Subscribe this Blog

Wikipedia

Search results

Notifications and New Posts!

Friday, July 10, 2020

Google Meet Session - 10th July 2020 C++ TY Mechanical (A and B)

C++ TY Mech AB
Friday, 10 July13:30 – 15:30
Weekly on Friday, until 30 Sep 2020
Join with Google Meet
meet.google.com/qaj-pyzn-zmy
Join by phone
Description:Dear Student Friends,Please join sharp at 13:30 today. I will admit/allow students up to 13:40.Those who will join late for them door will be closed means entry to the session will be denied. Please note. Because admitting late, creates disturbance to all.
  1. 10 minutes before
Organiser: Sachin Bhosale



With Kind Regards,

To know attendance : Click here

Today we have discussed about Google Classroom. I request you all the students of 
TY Mechanical A and B division to join Class invitation which I have sent to your official email address.

Dear all TY Mechanical Engineering Students, Welcome to Google Class Room. This class room will help us to connect with each other. With this class room you can submit me your programs. Let's use Google Classroom. This is new way of submitting responses. Definitely it will help us to learn CPP together.

CPP program to understand Square Magic 4X4 Matrix.
Through this we understood use of 2D arrya.




/*
Square Magic
4X4 Matrix
*/
#include<iostream.h>
#include<conio.h>
class magic;
class magic
{
private:
int no;
int a[4][4]; //2D array
public:
void enterip()
{
cout<<"\n Please enter number from 22 to 99=";
cin>>no;
if(no>=22&&no<=99)
{
a[0][0]=no-20;
a[0][1]=1;
a[0][2]=12;
a[0][3]= 7;
a[1][0]= 11;
a[1][1]= 8;
//a[1][2]= a[0][0]-1;
a[1][2]= no-21;
a[1][3]= 2;
a[2][0]= 5;
a[2][1]= 10;
a[2][2]= 3;
a[3][0]=4;
//a[3][1]=a[0][0]+1;
a[3][1]=no-19;
//a[2][3]= a[3][1]+1;
a[2][3]= no-18;
a[3][2]=6;
a[3][3]=9;
cout<<"\n\n\n Square Matrix:\n";
displaymatrix(); //calling of udf
}
else
{
cout<<"\n Sorry !! Square matrix will not be displayed";
cout<<"\n Your input is not from 22 to 99!!";
}
}
void displaymatrix()
{
int i,j;
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
{
cout<<"\t"<<a[i][j];
}
cout<<"\n";
}
}
};
void main()
{
clrscr();
magic sm;
sm.enterip();
getch();

}






2 comments:

  1. It's was so important to me to learning languages 👌👌

    ReplyDelete
    Replies
    1. Thank you to Gorkshanath Shejal. For any issues please post such comment on my blogs. This will give me energy to work more.

      Delete