"The best way to cheer yourself up is to try to cheer somebody else up." Mark Twain

Friday, January 29, 2010

Creating a Spiral Matrix

eg.    Input : 3
        Output:      1   2   3
                           8   9   4
                           7   6   5



#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<math.h>
#include(<stdio.h>

void main()
{
    clrscr();
    int user_no = 1;
    int sa[100][100];

    cout<< "\nEnter a no.";
    cin>> user_no;

    int sqr = user_no*user_no;

    int r = 1,c = user_no;

    int n = 1;
    do{
    for(int b=r; b< =c; b++)
    {sa[r][b]=n;
    n++;
    }

    for(b=r+1; b< =c; b++)
    {
    sa[b][c] = n;
    n++;
    }

   
    n--;

    for(b=c; b > =r;b--)
    {sa[c][b]=n;
    n++;
    }

    for(b=c-1; b > =r+1;b--)
    {sa[b][r] = n;
    n++;
    }
    r++;
    c--;
    }while(n< = sqr);

    if(user_no%2 != 0)
    {
    int mid = ((user_no/2) + 1);
    sa[mid][mid] = sqr;
    }

    //display
    for(int a = 1; a< =user_no; a++)
    {
    for(int b = 1; b< =user_no; b++)
    {
    cout<< sa[a][b]<<"\t";
    }
        cout<< endl << endl;

    }
  getch();
}

Swap 3 integers without any fourth variables

eg.                               x = 10         y = 20     z = 30
output :                    x = 30         y = 10     z =20


#include<iostream.h>
#include<conio.h>
# include <stdio.h>

void main()
{
int x, y, z;

cout<< "\n Enter 3 nos :";
cin>> x >> y >> z ;

cout<<"\n Old values :\n";
cout << "x = " << x << " y = " <<< "z = " << z ;

x = x+y+z;
y = x - (y+z);
z = x - (y+z);
x = x - (y + z);

cout<<"\n New values :\n";
cout << "x = " << x << " y = " <<< "z = " << z ;

getch();
}

Write a program to prepare the invoice from the following data :

customer number
customer name and address
date of sale, description
quantity
unit price
discount percentage
sales tax percentage

===================================================


#include<iostream.h>
#include<conio.h>
#include<stdio.h>

struct date{
int day;
int mon;
int yr;
};

struct invo{
int cust_num;
char cust_nm[20];
char add[40];
date D_O_sale;
char descp[30];
int quan;
int unit_pr;
float discount;
float sales_tax;
};

void main()
{
invo Customer[10];
char c;

for(int i = 0; i< 10; i++)
{
cout<< "\n Enter the customer no.";
cin>> Customer[i].cust_num;

cout<< "\n Enter the Customer name :";
gets( Customer[i].cust_nm);

cout<< "Enter Date of Sale (dd-mm-yy):";
cin >> Customer[i].D_O_Sale.day >> c >>  Customer[i].D_O_Sale.mon >>  c >> Customer[i].D_O_Sale.yr ;

cout<< "\n Enter Description :";
gets( Customer[i].descp);

cout<< "\nEnter Quantity : ";
cin>> Customer[i].quan;

cout<< "\n Unit Price ?";
cin >> Customer[i].unit_pr;

cout<<"\n Discount :";
cin >> Customer[i].discount;

cout<<"\n Sales Tax :";
cin>> Customer[i].sales_tax;

}

clrscr();

cout<<" \n Customer Num.     Customer Name \t Address \t Date-of-Sale    Desc \t Quantity    Unit Price   Discount%   Sales-Tax% \n\n";

cout<<"================================================================ "

for( i = 0; i< 10; i++)
{
cout<< Customer[i].cust_num << "   "  << Customer[i].cust_nm << "\t" << Customer[i].add << "\t" << Customer[i].D_O_sale.day<<"-"<<  Customer[i].D_O_sale.mon << "-" << Customer[i].D_O_sale.yr << "    "<< Customer[i].descp << "\t" <<  Customer[i].quan << "   "<<   Customer[i].unit_pr << "    "<<  Customer[i].discount << "    "  << Customer[i].sales_tax << endl ;
}

getch( );
}

Friday, January 22, 2010

Create a structure called volumn that uses three variables (lenght, width, height ) of type distance (feet and inches) to model the volume of a room. Read the three dimensions of the room and calculate the volumn it represents , and print out the result. The volumn should be in cu. feet form, i.e., you will have to convert each dimension in to feet and fractions of foot. For instance , the lenght 12 feet 6 inches will be 12.5 feet.



#include<iostream.h>
#include<conio.h>

struct vol {
int  l_in_feet, b_in_feet, h_in_feet;
int l_in_inch, b_in_inch, h_in_inch;
};

void main()
{
vol room;
char ch[10];
cout << “\n Enter  length in feet and inches(XfeetXinch/X F. X I.) :”
cin >> l_in_feet >> ch >> l_in_inch >> ch;
cout << “\n Enter breadth  in feet and inches (XfeetXinch..):”
cin >> b_in_feet >> ch >> b_in_inch >> ch;
cout << “\n Enter  height in feet and inches(XfeetXinch…)  :”
cin >> h_in_feet >> ch >> h_in_inch >> ch;

float len, br, height;

len = l_in_feet + (float)(l_in_inch/12);
br = b_in_feet + (float)(b_in_inch/12);
height = h_in_feet + (float)(h_in_inch/12);
double  volm = (double)len * br*height;

cout<< “\n The Length  of the Room = “ << len << “feet”;
cout<< “\n The Breadth of the Room = “ << br << “feet”;
cout<< “\n The Volume of the Room = “ << height << “feet”;
cout<< “\n The Volume of the Room = “ << volm << “c.feet”;
getch();
}

Consider the following structure :

struct info {
float hra_rate, da_rate, cca, pf_rate, it_rate;
int days_worked;
};

struct emp
{
int empno;
char name[21];
float basic;
info others;
} salemp, puremp, imemp;

Using the information stored in others member of emp, calculate the Gross and Net Salary of an employee. The Gross Salary is calculated as follows :

(basic x days _ worked) /26  + (basic x hra _ rate)/100 + (basic x da _rate)/100 +cca

The Net Salary is calculated as follows :

Gross_Salary – ((basic x it _rate) /100 + (basic x pt _rate )/100)

==================================================================

#include<iostream.h>
#include<conio.h>
#include <stdio.h>

struct info {
float hra_rate, da_rate, cca, pf_rate, it_rate;
int days_worked;
};


struct emp
{
int empno;
char name[21];
float basic;
info others;
} salemp, puremp, imemp;




void main()
{
float gs, ns;
cout<< “\n Enter Records for Sale Emp :”;
cout <<”\n Enter EmpNo, EmpName, Basic Pay, HRA-rate, DA-rate, CCA-rate, PF-rate, IT-rate, Days of Work :”;
cin >> salemp.empno;
gets(salemp.name);
cin>> salemp.basic>> salemp.others.hra_rate >> salemp.others.da_rate >> salemp.others.cca >> salemp.others.pf_rate >> salemp.others.it_rate;
gs = (salemp.basic x salemp.others.days _ worked) /26  + (salemp.basic x salemp.others.hra _ rate)/100 + (salemp.basic x salemp.others.da _rate)/100 + salemp.others.cca;
ns = gs – ((salemp.basic x salemp.others.it_rate)/100 +( salemp. basic x salemp.others.pt_rate) /100);

cout<< “\nEmpNo.\tName\tThe Gross salary (Rs.)\t The Net Salary (Rs).”;

cout<<”\n”<< salemp.empno << “\t” << salemp.name<<”\t”<
<<”\t”< < gs < < ns;
cout<<”\n*******************************************”;




cout<< “\n Enter Records for Purchase Emp :”;
cout <<”\n Enter EmpNo, EmpName, Basic Pay, HRA-rate, DA-rate, CCA-rate, PF-rate, IT-rate, Days of Work :”;
cin >> puremp.empno;
gets(puremp.name);
cin>> puremp.basic>> puremp.others.hra_rate >> puremp.others.da_rate >> puremp.others.cca >> puremp.others.pf_rate >> puremp.others.it_rate;


gs = (puremp.basic x puremp.others.days _ worked) /26  + (puremp.basic x puremp.others. hra _ rate)/100 + (puremp.basic x puremp.others.da _rate)/100 + puremp.others.cca;


ns = gs – ((puremp.basic x puremp.others.it_rate)/100 +( puremp.basic x puremp.others.pt_rate) /100);
cout<< “\nEmpNo.\tName\tThe Gross salary (Rs.)\t The Net Salary (Rs).”;
cout<<”\n”<< salemp.empno << “\t” << salemp.name<<”\t”<
<<”\t”< < gs < < ns ;
cout<<”\n*****************************************”;
getch();

Thursday, January 21, 2010

Abbreviation

/*  The program can convert an extended term into its abbreviation.
eg -> Central Processing Unit : C P U
          World Wide Web : W W W   */

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>


void main()
{
char text[40], abbre[10];
int i;


cout<<"\n Enter the String (extended term):";
gets(text);


for( i = 0; text[i] ! = '\0' ; i++)
 if(text[i] = = ' ' )
   { strcpy(abbre, str[i+1]);
      strcpy(abbre, " ");
    }




cout<< text << " can be abbreviated into " << abbre;
getch();
}

Monday, January 18, 2010

Check Perfect No.

Factors of 6 are 1, 2, 3.

6 = 1+2+3

so, 6 is a perfect no.


#include<iostream.h>
#include<conio.h>


void main()
{
int num, r , fsum=0;
cout<< "\n Enter a number:";
cin >> num;
int n = num/2;
int i;
while(i<n)
{
if(num%i==0)
fsum = fsum + i;
i++
}
if(fsum == num)
cout<<"\n"<< num <<" is a perfect no.";
else
cout<<"\n"<< num <<" is a NOT perfect no.";getch();


}

A phone number such as (011)711 8802 can be thought of as having three parts: the area code(011), the exchange(711), and the number(8802). Write a program that uses a structure to store these three parts of a phone number separately.Call the structure phone. Create an array to store 20 records of its member wherein each record stores the member no., member name and phone number of phone type. Have the user input the information for all records and then display the entire information on the screen.


#include<iostream.h>
#include<conio.h>
#include <stdio.h>

struct phone{
int area_code;
int exchange;
int number;
};

struct member{
int member_id;
char name[30];
phone ph_no;
};

void main()
{
member rec[20];
char ch;
cout<<"\n Enter records of 20 members ";

for(int i = 0; i < 20 ; i++)
{
cout<< "\n Member ID ? ";
cin >> rec[i].member_id;
cout<< "\n Enter Name :";
gets( rec[i].name);
cout<< " \n Enter phone number in the format \'areacode - exchange - number (003 - 2442 - 6523)\' :";
cin >> rec[i].ph_no.area_code >> ch >>  rec[i].ph_no.exchange >> ch >> rec[i].ph_no.number ;
}

clrscr();

cout<< "\n Member ID \t Member Name \t Ph. No. \n ";
cout<< "--------------------------------------------\n\n";
for(int i = 0; i < 20 ; i++)

{
cout<< rec[i].member_id << "\t" << rec[i].name << "\t" << rec[i].ph_no.area_code<< "-" <<  rec[i].ph_no.exchange <<  "-" <<  rec[i].ph_no.number << endl ;
}

getch();

}











Write a program to record score of a cricket match. One array stores information of batting team such as bat'sman name, runs scored, indication if out, mode by which out along with total runs, overs played, total overs and extras. The other array stores information about bowling team such as bowler's name, over's bowled, maiden overs, runs given, and wicked taken. The program reads in the above information and depending upon the user's choice, it displays either the batting team's information or the bowling team's information.


#include<iostream.h>
#include<conio.h>
#include<stdio.h>




struct batting
{
char batsman[20];
int run;
boolean out;
int tot_run;
int overs;
int total_over;
int extra;
};




struct bowling
{
char bowler[20];
int overs;
int maiden_overs;
int runs;
int wicket;
};


void main()
{
batting bat_team[12];


bowling bo_team[12];


cout<<"\n Enter records of batting team :\n\n";
for(int i = o; i < 12 ; i++)
{
cout<<"\n Enter bat's man name :";
gets(bat_team[i].batsman);
cout<<"\n Enter run scored :";
cin>>bat_team[i].run;
cout<<"\n Type 0 NOT-OUT , Type 1 if OUT :";
cin>>bat_team[i].out;
cout<<"\n Enter total run :";
cin>>bat_team[i].total_run;
cout<<"\n Enter no. of overs played :";
cin>>bat_team[i].overs;
cout<<"\n Enter total over:";
cin>>bat_team[i].total_over;
cout<<"\n Extra ?";
cin>>bat_team[i].extra;
}


cout<<"\n Enter records of bowling team :\n\n";


for( i = o; i < 12 ; i++)
{
cout<<"\n Enter bowler's name :";
gets(bo_team[i].bowler);
cout<<"\n Enter overs bowled :";
cin>>bo_team[i].overs;
cout<<"\n Enter maiden overs :";
cin>>bo_team[i].maiden_overs;
cout<<"\n Enter runs :";
cin>>bo_team[i].runs;
cout<<"\n Enter wicked taken:";
cin>>bo_team[i].wicket;
}






char ch;
int n;


do
{
clrscr();


cout<<"\n Enter 1 to view batting team information:";


cout<<"\n Enter 2 to view bowling team information:";


cout<<"\n Enter your choice :";


cin>>n;


switch(n)


{


case 1:


cout<<"\n ************* BATTING TEAM *************\n";


cout<<"\n Name \t RUN-Scored Out Total-run Over's-played Total-Overs Extra ";


for( i = o; i < 12 ; i++)


{


cout<<"\n"<< bat_team[i].batsman <<"\t"<< bat_team[i].run<<" ";


if(bat_team.out)


cout<<"OUT";
else
cout<<"NOT-OUT";


cout<< " " <<   bat_team[i].total_run<< " " << bat_team[i].overs << " " << bat_team[i].total_over<<  " "<< bat_team[i].extra;
}


break;




case 2:


cout<< "\n ************* BOWLING TEAM *************\n";
cout<< "\n Name \t Overs_bowled Maiden-Overs Runs-Given Wicket-Taken ";


for( i = o; i < 12 ; i++)


{
cout<<  "\n"<< bo_team[i].bowler<< "\t"<< bo_team[i].overs<< " ";
cout<< " "<< bo_team[i].maiden_overs<< " "<< bo_team[i].runs<< " "<< bo_team[i].wicket<<" ";
}
break;


default:




cout<< "\n Wrong choice.";
 
}
 
cout<<"\n Do you continue (y/n);


cin>>ch;


}while(ch=='y' | | ch == 'Y');
getch();
}

Declare a structure to represent a complex no. ( a no. having a real and imaginary part). Write C++ function to add, subtract, multiply and divide two complex nos.


#include<iostream.h>
#include<conio.h>


struct complexNo
{
float real;
float img;
};
typedef complexNo cm;


void main()
{
cm n1, n2, res;


cout<<"\nEnter 2 complex nos:";


cout<<"\n\n Enter 1st No.:";


cout<<"\n Real = ? ";


cin>>n1.real;


cout<<"\n Imaginary = ? ";


cin>>n1.img;


cout<<"\n Enter 2st No.:";


cout<<"\n Real = ? ";


cin>>n2.real;


cout<<"\n Imaginary = ? ";


cin>>n2.img;

 res.real = n1.real +n2.real;


res.img = n1.img + n2.img;


cout<<"\n Sum of " << n1.real << " + i " << n1.img << " & " << n2.real << " +i " << n2.img << "is "<< res.real << " + i " + << res.img;


res.real = n1.real -n2.real;


res.img = n1.img - n2.img;


cout<<"\n Diff. of " << n1.real << " + i " << n1.img << " & " << n2.real << " + res.img; 


res.real = n1.real *n2.real;
res.img = n1.img *n2.img;

cout<<"\n Product of " << n1.real << " + i " << n1.img << " & " << n2.real << " +i " << n2.img << "is "<< res.real << " + i " + << res.img; 


res.real = n1.real / n2.real;
res.img = n1.img / n2.img;


cout<<"\n Result od dividing of " << n1.real << " + i " << n1.img << " by " << n2.real << " +i " << n2.img << "is "<< res.real << " + i " + << res.img; 


getch();
}


Saturday, January 16, 2010

Solve Linear equations through Gauss Elimination method.


#include<iostream.h>
#include<conio.h>
#include<math.h&gt
void gauss1(int n, float a[10][10], float b[10], float x[10]);
void elim(int n, float a[10][10], float b[10]);
void bsub(int n, float a[10][10], float x[10]);


void main()
{
clrscr();
int status, n, i, j;
float a[10][10], b[10], x[10];


cout<<"\n What is the size of the system / dimmension (n) :";


cin>> n ;


cout<<"\n Enter coefficients a(i,j) , row-wise :";


for( i=0 ;i < n ; i ++ )


for (j=0;j < n ; j++)


cin>>a[i][j];


cout<<"\n Input vector b :";

for(i=0;i < n; i++)


cin>>b[i];


//obtain solution by gauss elimination method


gauss1(n, a, b, x);


cout<<"\n Solution vector X \n ";


for(i=0;i < n ; i++)


cout<< x[i]<<"\t";


getch();


}






void gauss1(int n, float a[10][10], float b[10],  float x[10])


{


elim(n,a,b);


bsub(n,a,b,x);


return;


}






void elim(int n, float a[10[10], float b[10], float x[10])


{


int i,k,j;


float factor;


for(k=0;k < n-1 ; k++ )


{


 for(i=k+1; i < n;i++)


{


factor = a[i][k]/a[k][k];


    for(j=k+1;j < n;j++)


   { a[i][j] = a[i][j] - factor* a[k][j];}


}


return;


}






void bsub(int n, float a[10][10], float b[10] float x[10])


{


int i,j,k;


float sum;


x[n-1] = b[n-1] / a[n-1][n-1];


for(k = n -2; k>=0; k--)


{


sum = 0.0;


for(j = k+1; j < n ; j++)


sum = sum + a[k][j] * x[j];


x[k] = (b[k] - sum) / a[k][k];


}


return;


}

Friday, January 15, 2010

Write a program, which will read in student records and print them in sorted order. Each record should be represented by a C structure having member/fields for the first name, last name and student number(an integer). You should sort first by first name, then by last name (this way they will be fully sorted by name when you finish). You can read the information in from the console or from a file, and should print out the sorted list to the console. You can assume some reasonable upper limit on number of records (say , 25) if you want to use an array.


#include<iostream.h>
#include<conio.h>
#include<stdio.h>

// program is done by console input and the array with upper limit 25



struct student
{
char fname[20];
char lname[20];
int id_no;
};
typedef student S;
void main()
{
S s[25];

char tfname[20], tlname[20];
int t;
for(int i = 0; i<25; i++)
{

cout<<"\n Enter Student's first name:";
cin>>s[i].fname;
cout<<"\n Enter Student's last name:";
cin>>s[i].lname;
cout<<"\n Enter ID NO";
cin>>s[i].id_no;
}

for(i = 0; i<24; i++)

{
for(int j = i+1; j<25; j++)
{
if(strcmp(s[i].fname, s[j].fname)>0)
{
tfname = s[i].fname;
s[i].fname = s[j].fname;
s[j].fname = tfname;

tlname = s[i].lname;

s[i].lname = s[j].lname;
s[j].lname = tlname;

t = s[i].id_no;
s[i].id_no = s[j].id_no;
s[j].id_no = t;
}
else
{
 if(strcmp(s[i].fname, s[j].fname)==0)

  {
       if(strcmp(s[i].lname, s[j].lname)>0)        {tfname = s[i].fname;


         s[i].fname = s[j].fname;
         s[j].fname = tfname;

         tlname = s[i].lname;
         s[i].lname = s[j].lname;
         s[j].lname = tlname;


         t = s[i].id_no;
         s[i].id_no = s[j].id_no;
         s[j].id_no = t;
        }
}
}
}

cout<<"\n\n FIRST NAME \t LASTNAME \t ID NO ";

for(int i = 0; i<25; i++)

{
cout<<"\n"<< c[i].fname<<"\t" <lt; c[i].lname <<="" <
}
getch();
}



 



A Linear array if size 50 stores following informations : name the country, country's capital and per capita income of the country. Write a complete program in C++ to do the following:

(a) To read a country's name and display capital and per-capita income.
(b) To read name of the capital city and displays country's name  and displays country's name and per capita income.
Display an error message in case of an incorrect input.

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>

struct country{
char country_name[20];
char capital_name[20];
float incm;
};

typedef country C;

void main()
{

C c[50];

for(int i = 0; i<49; i++)
{
cout<<"\n Enter Country's name :";
cin>>c[i].country_name;

cout<<"\n Enter the name of Capital :";
cin>>c[i].capital_name;

cout<<"\n Enter per capita incme:";
cin>>c[i].incm;

}

char cname[20];
char capital[20];
char choice;
int n, flag = 0 ;
do
{

cout<<"\n ***********MENU***********\n\n";
cout<<" 1. Know Capital for a country :";
cout<<"\n 2. Know County for a capital :";

cout<<"\n\n Enter your choice :";
cin>>n;

switch(n)
{
case 1:

cout<<"\n Enter a country name :";

gets(cname);
for(i=0; i<50; i++)
if(strcmp(c[i].country_name, cname)==0)

cout<<"The capital of  "<< c[i].country_name <<" is " << c[i].capital_name ;
cout<<"\n Per caita income = Rs. "<< c[i].incm;
flag = 1;
break;
}
break;

case 2:cout<< "\n Enter a capital name :";

gets(capital);
for(i=0; i<50; i++)
if(strcmp(c[i].capital_name, capital)==0)
{
cout<<"\nThe capital of "<< c[i].capital_name  <<" is " << c[i].country_name ;
flag = 1;
cout<<"\n Per capita income = Rs. "<< c[i].incm;
break;



}
break;

default:
cout<<"\n Wrong Input! ";
}

if(flag == 0)
cout<<"\n No Information .";

cout<<"\n\n Do you want to continue (Y/N) :";
cin>>choice;
}while(choice == 'Y' || choice == 'y');
getch();


}

Wednesday, January 13, 2010

Consider a 1-D array 'A' containing 100 integers. Develop a program to do the following:



(i) remove all occurrences of a given integer.
(ii) shift the elements of the array to the right so that used space is available at the left end
(iii) fill the unused spaces by 0 (zero)

(For example , the array 10 | 20 | 15 | 4 | 20 |2 | 20 after execution of the program for given integer 20 should become
 0 | 0 | 0 | 10 | 15 | 4 | 2)

======================================

#include<iostream.h>
#include<conio.h>

void main()
{
int A[100], B[100], i , j, n;


cout << "\n Enter the elements in an array:";

for( i = 0; i<=99; i++)
cin>>A[i];


cout<< "\n Enter an element to be removed from array :";
cin>>n;

//remove all occurrences of a given integer.

j = 0;
for(i = n-1; i>0; i--)
{
if(n != A[i])
B[j++] = A[i];
}

//right shift and store zeros at the beginning of the list


for (i = j; i>0; i --)
B[i] =0;

// Display Original

for(i = 0; i< n ; i++)
cout<< A[i] << "  ";

// Change the Source Array

for(i = 0; i< n; i++)
A[i] = B[i];

//Display the changed array after right-shift

for(i = 0; i< n ; i++)
cout<< A[i] << "  ";


getch();
}


Pascal Triangle

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1


#include<iostream.h>
#include<conio.h>
#include<process.hgtgt;

void main()
{
int a[10][10];
int i,j,c,n;
clrscr();

cout<<"Enter the height(below 11): ";
cin>>n;
if(n>10 || n<1)
{cout<<"\n Wrong input";
getch();
exit(1);
}

a[0][0]=1;
a[1][0]=1;
a[1][1]=2;
a[1][2]=1;


for(i=2;i < n ; i++)
{ a[i][0]=1;
j=1;c=2;
while(j<=i)
{
a[i][j]=a[i-1][c-1]+a[i-1][c-2];
c=c+1;
j=j+1;
}
a[i][j]=1;
}

//display

int sp = n;
for(int s = 0; s <=sp; s++)
cout<<" ";
cout<<a[0][0]<<"\n";
sp=sp-2;
for(s = 0; s <=sp; s++)
cout<<" ";
cout<< a[1][0]<<" " << a[1][1] <<" "<<a[1][2];
cout<<"\n";
for(i=2;i < n ; i++ )
{
sp--;
for( s = 0; s <=sp; s++)
cout<<" ";
cout<< a[i][0] <<" ";
j=1,c=2;
while(j<=i)
{cout<<a[i][j] <<" ";
j++;
c++;}
cout<< a[i][j] << "\n";
}

getch();
}
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.
Now Playing: Ballade Pour Adeline

About Me

My photo
I m an IT lecturer of a college. I love social-work. I want to do something beneficial for society before dying , that can promote our society, to some extent.