jgar's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
16 (0.02 per day)
Joined:
31-August 12
Profile Views:
222
Last Active:
User is offline Sep 27 2012 07:57 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   jgar has not set their status

Posts I've Made

  1. In Topic: Adding Matrix

    Posted 27 Sep 2012

    What I do not know how to do is how can I implement a function to add two matrices
    and return the result as a pointer to a new matrix, which would be the sum of the original 2 matrices.

    I am very confuse....

    double add(class matrix)
    {
    
    	entries = new double *[rows];
    
    	if (rows = matrix.rows && columns == matrix.columns)
    
    		for (int i =0; i < rows; i++)
    		{
    		for( int j =0; j< columns; j++)
    		{
    			entries[rows][columns] = entries[rows][columns] + matrix[rows][columns];
    		}
    
    return entries[rows][columns];
    };
    
    
  2. In Topic: Adding Matrix

    Posted 27 Sep 2012

    PLEASE CAN ANYONE GIVE SOME TIPS???
    OR TELL ME IF I AM IN THE RIGHT WAY??
  3. In Topic: List of prime numbers in C++

    Posted 4 Sep 2012

    Thank you very much:)
  4. In Topic: List of prime numbers in C++

    Posted 4 Sep 2012

    No it's not my complete code...
    That part is just the function I am going to call on the main function...
    Here is my main function....

    /// I also have other prototype for different functions I am working on...

    int listPrimes(int n);
    
    int main()
    {
    std::string name;  
    
         name = "robbie";  
         capital(name);   
    
    
     int w = 2147483648;
    
          cout << w-1 << endl;
    
          cout << w << endl;
    
          cout << w+1 << endl;
    
          cout << w+2 << endl;
    
     
    int a =10;
    int b=13;
    
     cout << "The largest is: " << maximum(5, 22, 18) << endl;
    
    
    cout << "The smallest is: " << minimum(15, 18, 16) << endl;
    
    
     cout << "A random number between " << a << " and " << b << " is " << random(a,B)/> << endl;  
    
    
    std::cout << name <<std::endl;  
     
     listPrimes(15);
    
    
    system ("pause");
    return 0;
    
    }
    
  5. In Topic: List of prime numbers in C++

    Posted 4 Sep 2012

    Here is the code....

    int listPrimes(int n)
    {
    int c, d, e =0;
    
    for(c = 2; c <= n; c++)
    {
    	for (d = 2; d < n; d++)
    	{
    		if (c%d ==0)
    		{ 
    			e = e+1;
    			return e;
    		}
    	}
    	if (e == 1)
    	{
    		return 0;
    	}
    	e =0;
    }
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

jgar hasn't added any friends yet.

Comments

jgar has no profile comments yet. Why not say hello?