Share Pastebin
Guest
Public paste!

hey

By: a guest | Mar 18th, 2010 | Syntax: C++ | Size: 0.39 KB | Hits: 48 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. #include <iostream.h>
  2. #include "apmatrix.h"
  3. #include "math.h"
  4.  
  5.  void main()
  6.  {
  7.  int row,column;
  8.  int max=-1000000000;
  9. apmatrix<int>num(3,5,0);
  10.  
  11. for(int i=0;i<num.numrows();i++)
  12.     for(int j=0;j<num.numcols();j++)
  13.         {
  14.         cin>>num[i][j];
  15.     if(num[i][1]>max)
  16.            {         
  17.                         max=num[i][1]; 
  18.                         row=i;
  19.                         column=1;      
  20.                
  21.                 }
  22.          }
  23. cout<<"The largest number is "<<max;
  24.  
  25. }