>m>>n; for(i=0;i<m;i+" name="description">
Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners find error inc++
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


seaman
find error inc++
1 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners


include
include

int main()
{
      int a[10],b[10],i,j,m,n;
      cout<<"Enter size of matrix";
      cin>>m>>n;

for(i=0;i<m;i++)//Initializing matrix a for(j=0;j<n;j++) { cout<<"a["<<i<<"]["<<j<<"]="; cin>>a[i][j]; } for(i=0;i<m;i++)//Transposing matrix for(j=0;j<n;j++) { b[i][j]=a[j][i]; } for(i=0;i<=m;i++)//printing matrix b { cout<<endl; for(j=0;j<=n;j++) { cout<<"\t"<<b[i][j]; } } getch(); return 0; }

Advertisement
View Answers

August 27, 2011 at 11:18 AM


    #include<iostream.h>
    #include<conio.h>
    void main()
    {
    clrscr();
    int a[10][10],m,n,i,j;
    cout<<"Enter number of rows: ";
    cin>>m;
    cout<<"Enter number of coloumns: ";
   cin>>n;
   if(m!=n)
   {
   cout<<"Matrix not square so Transpose not possible!";
   }
   else
   {
   cout<<endl<<"Enter elements of matrix: "<<endl;
   for(i=0;i<m;i++)
   {
  for(j=0;j<n;j++)
   {
  cout<<"Enter element a"<<i+1<<j+1<<": ";
   cin>>a[i][j];
   }
   }
   cout<<endl<<"Matrix: "<<endl<<endl;
   for(i=0;i<m;i++)
   {
   for(j=0;j<n;j++)
   {
   cout<<a[i][j]<<" ";
   }
   cout<<endl<<endl;
   }
  cout<<endl<<"Matrix Transpose: "<<endl<<endl;
   for(i=0;i<m;i++)
   {
   for(j=0;j<n;j++)
   {
  cout<<a[j][i]<<" ";
   }
   cout<<endl<<endl;
   }
   }
  getch();
   }


Related Tutorials/Questions & Answers:
find eror inc++
find error inc++   include include int main() { int a[10],b[10],i,j,m,n; cout<<"Enter size of matrix"; cin>>m>>n; for(i=0;i<m;i++)//Initializing matrix a for(j=0;j<n;j
Some error find whats the problem
Some error find whats the problem  import java.io.*; public class Replace { public void main()throwsIoException { InputStreamReader = new InputStreamReader(System.in); BufferReader br=new BufferReader(z); System.out.println
Advertisements
Error 500: WSWS3142E: Error: Could not find Web services engine. - WebSevices
Error Could not find Web services engine   Hi...: faultNode: faultDetail: {}:return code: 500 Error 500: WSWS3142E: Error: Could not find Web services engine. { http://xml.apache.org/axis
Error 500: WSWS3142E: Error: Could not find Web services engine. - WebSevices
Error 500 WSWS3142E Error Could not find Web services engine  Hi all, I am getting the following error.Error 500: WSWS3142E: Error: Could not find Web services engine. Please Help. Thanks in Advance
could not find the main class programm will exit - error
could not find the main class programm will exit - error  when i tried to run the below mentioned programmed it gives a error states - could not find main class programm will exit. class Car { String name: String Color
Java error cannot find symbol
Whenever a Compiler does not recognize a class name, Java displays an error “cannot find symbol”. The reason behind cannot find symbol error... the java error cannot find symbol. In this example a class name 'cannot find
i cant find any compile time error but there is runtime error.
i cant find any compile time error but there is runtime error.  ...){ System.out.println("Error:connection not created"); }   Hi...("Error is:" + s.getMessage()); } } catch (Exception e
JSP cannot find symbol error - JSP-Servlet
JSP cannot find symbol error  Suppose-- we created 'a.jsp' in which we make a database connection... how to retrieve 'new' here... If I want to access the 'new' string within the form what should i do???  
Java error cannot find symbol
Java error cannot find symbol       The java error cannot find symbol occurred when a Compiler...; the compiler does not recognize a variable e show you an error Java error cannot find
Error : javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
Error : javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope  I am getting following error in my struts-jsp proram for adding data to the database. 500 Internal Server Error
cannot find java.exe error while opening netbean5.5 - IDE Questions
cannot find java.exe error while opening netbean5.5  HI, 1)i am working netbean5.5 tool.I got the error of cannot find c:\programfiles\java... this problem? 2)while i am installing nokiamobiletoolkit, I got the error name
Error !!! Can not find the tag library descriptor for "/WEB-INF/tlds/template.tld"
Error !!! Can not find the tag library descriptor for "/WEB-INF/tlds/template.tld"   I am not able to fix this problem. I tried different jar files, but no luck. Is there anything else apart from adding jar files that i can try
How to eliminate error," Could not find the main class: filecopy.FileCopy. Program will exit." ?
How to eliminate error," Could not find the main class: filecopy.FileCopy. Program will exit." ?  run: java.lang.NoClassDefFoundError: filecopy...) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main
Error 500-Server are not find the jar file in the program of upload the file - JSP-Servlet
Error 500-Server are not find the jar file in the program of upload the file  Hello Sir, your response: Hi friend, The 500 Internal Server Error is a "server-side" error, meaning the problem is not with your PC or Internet
plz check my codings are correct or not...There is an error..i cant find it..
plz check my codings are correct or not...There is an error..i cant find it..  import java.util.Scanner; public class Student { private String indexNo; private String gender; private char initial; private int mark1
Java error cannot find symbol
Java error cannot find symbol In this section you will learn about "cannot find symbol" in java. Java cannot find symbol is a type of error occurs... the variable in use its trying to refer, then it will give a error cannot find symbol
Blackboard Inc. Develops Seamless Learning for iPhone Users
Blackboard Inc. Develops Seamless Learning for iPhone Users       Blackboard Inc. has developed free application for the iPhone users. With the use of this application
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??  import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class add1 extends MIDlet implements
error
error  while iam compiling iam getting expected error
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version. This type error also comes when java file
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
 

 

 

DMCA.com