Solved

Help with istream for HugeInt program

Posted on 2009-04-09
7
411 Views
Last Modified: 2012-05-06
I am having trouble with my istream in my HugeInt program.
Also I am having trouble developing a multiplication and division operator function.
Here is the code:
/* HugeInt.h */ 
 
#pragma once
 
#include <iostream>
using namespace std;
 
class HugeInt
{
private:
	int digits[40];
	int len;
	long long integer;
	
public:
	HugeInt(void);
	~HugeInt(void);
	
	HugeInt(long long init);
	HugeInt(const HugeInt &h);
	
	friend ostream &operator<<(ostream &output, HugeInt &outVal);
	friend istream &operator>>(istream &input, HugeInt &inVal);
 
	HugeInt &operator =(const HugeInt& rhs);
	HugeInt operator +(const HugeInt& rhs) const;
	HugeInt operator -(const HugeInt& rhs) const;
	
	HugeInt operator *(const HugeInt& rhs) const;
	HugeInt operator /(const HugeInt& rhs) const;
 
	bool operator <(const HugeInt& rhs) const;
	bool operator <=(const HugeInt& rhs) const;
	
	bool operator >(const HugeInt& rhs) const;
	bool operator >=(const HugeInt& rhs) const;
	
	bool operator ==(const HugeInt& rhs) const;
	bool operator !=(const HugeInt& rhs) const;
	bool operator !() const;  
 
	int getLength();
	void setLength();
 
};
 
/* HugeInt.cpp*/
 
#include <string>
#include <iostream>
 
using namespace std;
 
HugeInt::HugeInt(void)
{
	// Initialize private members to Zero
	len = 0;
	integer = 0;
 
	// Initialize Array to Zero
	for(int x=0; x<=39; x++)
		digits[x]=0;
}
 
HugeInt::~HugeInt(void)
{
}
 
 
HugeInt::HugeInt(long long init)
{
	// Initialize private members to Zero
	len = 0;
	integer = 0;
	
	// Initialize Array to Zero
   for (int x=0; x<=39; x++)
      digits[x] = 0;
 
   setLength();
 
}
  
HugeInt::HugeInt(const HugeInt &h)
{
	len = h.len;
	integer = h.integer;
 
	for(int x = 0; x<=39; x++)
		digits[x] = h.digits[x];
 
}
 
int HugeInt::getLength()
{
	int maxlen = 40;
 
	for(int x=40; x>0; x--)
	{
		if(digits[x]= 0)
			maxlen--;
		else
			return maxlen;
	}
	return 0;
}
 
void HugeInt::setLength()
{
	len = 0;
	long long num = integer;
 
	for(long long temp = 10; num > 0; len++)
		num /= temp;
}
 
HugeInt& HugeInt::operator =(const HugeInt &rhs)  
{
	len = rhs.len;
	
	for(int x=len; x>=0; x--)
	{
		digits[x] = rhs.digits[x];
	}
 
	return *this;
}
 
/* Addition Function */
HugeInt HugeInt::operator +(const HugeInt &rhs) const
{
	HugeInt ans; 
	HugeInt lhs = *this;
	int x=0;
 
	//Set greater length in order to add 
	if (lhs > rhs)
		x=lhs.len;
	else
		x=rhs.len; 
 
	//Addition 
	for (int y=0; y<=x; y++) 
	{
		ans.digits[y] = digits[y] + rhs.digits[y] + ans.digits[y];
 
		if (ans.digits[y] > 9) {
			ans.digits[y+1]=ans.digits[y]/10;
			ans.digits[y]%=10;
		}
	}
 
	ans.len = ans.getLength();
	return ans;
}
 
/* Subtraction Function */ 
HugeInt HugeInt:: operator -(const HugeInt &rhs) const
{
	HugeInt ans;
	HugeInt lhs = *this;
 
	//Right hand side must be larger or returns -1
	if (lhs < rhs) 
	{
		ans.integer = -1;
		return ans;
	}
	
	// Subtraction
	for (int x = len; x >=0; x--) 
	{
		if (digits[x] < rhs.digits[x]) 
		{
			ans.digits[x]=10 + digits[x] - rhs.digits[x];
			ans.digits[x+1]--;
		}
		else 
			ans.digits[x] = digits[x] - rhs.digits[x];
	}
 
	ans.len = ans.getLength();
	return ans;
}
 
/* Less Than Function*/ 
bool HugeInt::operator <(const HugeInt& rhs) const 
{
	for (int x=39; x>=0; x--)
	{
		if (rhs.digits[x] > digits[x])
			return true;
		if (rhs.digits[x] < digits[x])
			return false;
	}
	return false;
}
 
/* Less Than OR Equal to Function */ 
bool HugeInt::operator <=(const HugeInt& rhs) const 
{
	HugeInt lhs(*this);
	
	if(lhs==rhs || lhs<rhs)
		return true;
	else
		return false;
}
 
/* Greater Than Function*/
bool HugeInt::operator >(const HugeInt& rhs) const 
{
	for (int x=39; x>=0; x--)
	{
		if (rhs.digits[x] < digits[x])
			return true;
		if (rhs.digits[x] > digits[x])
			return false;
	}
	return false;
}
 
/* Greater Than OR Equal to Function */
bool HugeInt::operator >=(const HugeInt& rhs) const 
{
	HugeInt lhs(*this);
	
	if(lhs==rhs || lhs>rhs)
		return true;
	else
		return false;
}
 
/* Equal to Function*/ 
bool HugeInt::operator ==(const HugeInt& rhs) const 
{
	for (int x=39; x>=0; x--)
	{
		if (rhs.digits[x] < digits[x])
			return false;
		if (rhs.digits[x] > digits[x])
			return false;
	}
	return true;
}
 
/* Not Equal Function */ 
bool HugeInt::operator !=(const HugeInt& rhs) const 
{
	HugeInt lhs(*this);
	
	if(lhs==rhs)
		return false;
	else
		return true;
}
 
/* Zero Check Function */ 
bool HugeInt::operator !() const 
{
	HugeInt lhs(*this);
	
	if (lhs==0)
		return true;
	else
		return false;
}
ostream& operator <<(ostream &output, HugeInt &outVal)
{
	for(int i = outVal.getLength() - 1; i>=0; i--)
		output<<outVal.digits[i];
 
	if (outVal == 0)
		output<<"0";
 
	return output;
}
 
istream& operator >>(istream &input, HugeInt &inVal)
{
	char in[40];
	int i(0), j(0);
 
	input>>in;
 
	while(in[i] != 0)
		i++;
 
	for(; i>0; i--)
	{
		inVal.digits[j] = in[i-1] - '0';
		j++;
	}
 
	return input;
}
 
/* HugeIntTester.cpp */
 
#include "lab4_HugeInt.h"  
#include <iostream>
 
 
using namespace std;
 
/* Main Program */ 
int main()
{
	HugeInt a,b;
	HugeInt c(a), d(b);
 
	cout << "Input h1: ";
	cin >> a >> endl;
	cout << "Input h2: ";
	cin >> b >> endl;
 
	cout << "h1 + h2 = " << a+b<< endl;
 
	//Subtract
	cout << "h1 -  h2 = " << a-b << endl;
 
	//Multiply
	//cout << "h1 *  h2 = " << a*b << endl;
 
	//Divide
	//cout << "h1 /  h2 = " << a/b << endl;
 
	//Less than
	if (a<b)
		cout << "h1 <  h2 = True" << endl;
	else
		cout << "h1 <  h2 = False" << endl;
 
	//Less than or equal
	if (a<=b)
		cout << "h1 <= h2 = True" << endl;
	else
		cout << "h1 <= h2 = False" << endl;
 
	//Greater than
	if (a>b)
		cout << "h1 >  h2 = True" << endl;
	else
		cout << "h1 >  h2 = False" << endl;
 
	//Greater than or equal
	if (a>=b)
		cout << "h1 >= h2 = True" << endl;
	else
		cout << "h1 >= h2 = False" << endl;
 
	//Equal
	if (a==b)
		cout << "h1 == h2 = True" << endl;
	else
		cout << "h1 == h2 = False" << endl;
 
	//Not equal
	if (a!=b)
		cout << "h1 != h2 = True" << endl;
	else
		cout << "h1 != h2 = False" << endl;
 
	//!(a)
	if (!(a))
		cout << "!h1     = True" << endl;
	else
		cout << "!h1     = False" << endl;
 
	//!(b)
	if (!(b))
		cout << "!h2     = True" << endl;
	else
		cout << "!h2     = False" << endl;
 
	//Copies
	cout << "h3 =  h1 = " << c << endl;
	cout << "h4 =  h2 = " << d << endl;
 
	//Add
	cout << "h1 + h2 + 200 = " << a+b+200 << endl;
	
	return 0;
}

Open in new window

0
Comment
Question by:MichaelT231
  • 5
  • 2
7 Comments
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24118207
>>>> I am having trouble with my istream in my HugeInt program.

You better read char by char in a loop so that you easier can detect the first non-digit and stop reading.

Note, for the first char you may check for + or - . Also most stream operators would accept leading spaces.

>>>> Also I am having trouble developing a multiplication and division operator function.

You should post some of of the attempts. I mean I gave you some guidance in another thread. You might take that as a base.
 
0
 

Author Comment

by:MichaelT231
ID: 24118696
Ok i got the istream working and i worked out some bugs. The only problem now is my '=' operator for the which just copy (a deep copy).
Here is the section of code:
[code]
/* HugeInt.h */
#pragma once

#include <iostream>
using namespace std;

class HugeInt
{
private:
      int digits[40];
      int len;
      long long integer;
      
public:
      HugeInt(void);
      ~HugeInt(void);
      
      HugeInt(long long init);
      HugeInt(const HugeInt &h);
      
      friend ostream &operator<<(ostream &output, HugeInt &outVal);
      friend istream &operator>>(istream &input, HugeInt &inVal);

      HugeInt &operator =(const HugeInt& rhs);
      HugeInt operator +(const HugeInt& rhs) const;
      HugeInt operator -(const HugeInt& rhs) const;
      
      HugeInt operator *(const HugeInt& rhs) const;
      HugeInt operator /(const HugeInt& rhs) const;

      bool operator <(const HugeInt& rhs) const;
      bool operator <=(const HugeInt& rhs) const;
      
      bool operator >(const HugeInt& rhs) const;
      bool operator >=(const HugeInt& rhs) const;
      
      bool operator ==(const HugeInt& rhs) const;
      bool operator !=(const HugeInt& rhs) const;
      bool operator !() const;  

      long long getInteger();
      int getLength();
      void setLength();
      void sepDigits();

};

/* Section of HugeInt.cpp */

HugeInt& HugeInt::operator =(const HugeInt &rhs)  
{
      len = rhs.len;
      
      for(int x=len; x>=0; x--)
      {
            digits[x] = rhs.digits[x];
      }

      return *this;
}

/* Section of HugeIntTester.cpp */

HugeInt a;
HugeInt b;
HugeInt c;
HugeInt d;

.
.
.

/* Copy */
cout << "h3 =  h1 = " << (c=a) << endl;
cout << "h4 =  h2 = " << (d=b) << endl;

[/code]

Test case:
h1 = 2009
h2 = 2

The current output:
h3 = h1 = 2000
h4 = h2 = 0

The correct output:
h3 = h1 = 2009
h4 = h2 = 2


0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24120100
>>>> my '=' operator for the which just copy (a deep copy).

No, it is a flat copy. A deep copy is of you have member pointers or member objects with pointers.

You better would drop the operator= same as copy constructor. If there is no declaration in class the compiler would generate both for you and it surely is the best way to handle that issue.  
0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24120127
>>>> h1 = 2000

For that you need an implementation of

  HugeInt& HugeInt::operator =(int i);  


If there is none, the compiler does

   h1 = HugeInt(2000);

So, to find the error you probably have to check the constructor that takes an int.
0
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 500 total points
ID: 24120137
... or drop the operator=(const HugeInt&) as suggested.
0
 

Author Comment

by:MichaelT231
ID: 24120493
Yup, right after I posted the problem and went through debugging, I found the problem. Thanks for your help though. Here is the working code for people in the future.
/* HugeInt.h */ 
#pragma once
 
#include <iostream>
using namespace std;
 
class HugeInt
{
private:
	int digits[40];
	int len;
	long long integer;
	
public:
	HugeInt(void);
	~HugeInt(void);
	
	HugeInt(long long init);
	HugeInt(const HugeInt &h);
	
	friend ostream &operator<<(ostream &output, HugeInt &outVal);
	friend istream &operator>>(istream &input, HugeInt &inVal);
 
	HugeInt &operator =(HugeInt& rhs);
	HugeInt operator +(const HugeInt& rhs) const;
	HugeInt operator -(const HugeInt& rhs) const;
	
	HugeInt operator *(const HugeInt& rhs) const;
	HugeInt operator /(const HugeInt& rhs) const;
 
	bool operator <(const HugeInt& rhs) const;
	bool operator <=(const HugeInt& rhs) const;
	
	bool operator >(const HugeInt& rhs) const;
	bool operator >=(const HugeInt& rhs) const;
	
	bool operator ==(const HugeInt& rhs) const;
	bool operator !=(const HugeInt& rhs) const;
	bool operator !() const;  
 
	long long getInteger();
	int getLength();
	void setLength();
	void sepDigits();
 
};
 
/* HugeInt.cpp */ 
 
#include "lab4_HugeInt.h"
  
#include <string>
#include <iostream>
 
using namespace std;
 
HugeInt::HugeInt(void)
{
	// Initialize private members to Zero
	len = 0;
	integer = 0;
 
	// Initialize Array to Zero
	for(int x=0; x<=39; x++)
		digits[x]=0;
}
 
HugeInt::~HugeInt(void)
{
}
 
 
HugeInt::HugeInt(long long init)
{
	// Initialize private members to Zero
	len = 0;
	integer = init;
	
	// Initialize Array to Zero
   for (int x=0; x<=39; x++)
      digits[x] = 0;
 
   setLength();
   sepDigits(); 
 
}
  
HugeInt::HugeInt(const HugeInt &h)
{
	len = h.len;
	integer = h.integer;
 
	for(int x = 0; x<=39; x++)
		digits[x] = h.digits[x];
 
}
 
/* Gets Length of Array */ 
int HugeInt::getLength()
{
	int maxlen = 40;
 
	for(int x=39; x>=0; x--)
	{
		if(digits[x]== 0)
			maxlen--;
		else
			return maxlen;
	}
	return 0;
}
 
/* Sets Length */
void HugeInt::setLength()
{
	len = 0;
	long long num = integer;
 
	for(long long temp = 10; num > 0; len++)
		num /= temp;
}
 
/* Get Integer (Used for subtraction) */
long long HugeInt::getInteger()
{
	return integer;
}
 
/* Seperates Number */ 
void HugeInt::sepDigits() 
{
	long long n = integer;
	long long power = 1;
	int temp = 0;
	for(long long x=len-1; x>=0; x--)
	{
		for (long long y = x; y>0; y--)
			power*=10;
 
		temp = (n/power);
		digits[x] = temp;
		n-=digits[x]*power;
		power=1;
	}
}
 
/* Equals Function */ 
HugeInt& HugeInt::operator =(HugeInt &rhs)  
{
	for(int x=0; x<40; x++)
		digits[x] = rhs.digits[x];
 
	return rhs;
}
 
/* Addition Function */
HugeInt HugeInt::operator +(const HugeInt &rhs) const
{
	HugeInt ans; 
	HugeInt lhs = *this;
	HugeInt rhscopy(rhs);
	int x=0;
 
	//Set greater length in order to add 
	if (lhs > rhs)
		x = lhs.getLength();
	else
		x = rhscopy.getLength(); 
 
 
	//Addition 
	for (int y=0; y<=x; y++) 
	{
		ans.digits[y] = digits[y] + rhs.digits[y] + ans.digits[y];
 
		if (ans.digits[y] > 9) 
		{
			ans.digits[y+1]=ans.digits[y]/10;
			ans.digits[y]%=10;
		}
	}
 
	return ans;
}
 
/* Subtraction Function */ 
HugeInt HugeInt:: operator -(const HugeInt &rhs) const
{
	HugeInt ans;
	HugeInt lhs = *this;
	int x =0;
 
	//Right hand side must be larger or returns -1
	if (lhs < rhs) 
	{
		ans.integer = -1;
		return ans;
	}
	
	// Subtraction
	for (x = lhs.getLength(); x >=0; x--) 
	{
		if (digits[x] < rhs.digits[x]) 
		{
			ans.digits[x]=10 + digits[x] - rhs.digits[x];
			ans.digits[x+1]--;
		}
		else 
			ans.digits[x] = digits[x] - rhs.digits[x];
	}
 
	return ans;
}
 
/* Multiplication */ 
HugeInt HugeInt::operator *(const HugeInt &rhs) const
{
	HugeInt ans;
	HugeInt lhs = *this;
	HugeInt rhscopy= rhs;
 
	int temp = rhscopy.getLength();
 
	int x; 
	int y;
	int power=1;
 
	if (lhs > rhs) 
	{
		for(x=0; x<=temp; x++)
		{
			for(y=0; y < rhs.digits[x]*power; y++)
				ans = lhs + ans;
			y=0;
			power*=10;
		}
	}
	else 
	{
		for(x=0; x<=lhs.getLength(); x++)
		{
			for(y=0; y < digits[x]*power; y++)
				ans = rhs + ans;
			y=0;
			power*=10;
		}
	}
 
	return ans;
}
 
/* Division */
HugeInt HugeInt::operator /(const HugeInt &rhs) const
{
	HugeInt lhs =*this;
	HugeInt ans =0;
	HugeInt a = lhs; 
	HugeInt b = rhs;
 
	for (a; a>b; ans=ans+1)
		a=a-b;
	if (a==b)
		ans=ans+1;
 
	return ans;
}
 
/* Less Than Function*/ 
bool HugeInt::operator <(const HugeInt& rhs) const 
{
	for (int x=39; x>=0; x--)
	{
		if (rhs.digits[x] > digits[x])
			return true;
		if (rhs.digits[x] < digits[x])
			return false;
	}
	return false;
}
 
/* Less Than OR Equal to Function */ 
bool HugeInt::operator <=(const HugeInt& rhs) const 
{
	HugeInt lhs(*this);
	
	if(lhs==rhs || lhs<rhs)
		return true;
	else
		return false;
}
 
/* Greater Than Function*/
bool HugeInt::operator >(const HugeInt& rhs) const 
{
	for (int x=39; x>=0; x--)
	{
		if (rhs.digits[x] < digits[x])
			return true;
		if (rhs.digits[x] > digits[x])
			return false;
	}
	return false;
}
 
/* Greater Than OR Equal to Function */
bool HugeInt::operator >=(const HugeInt& rhs) const 
{
	HugeInt lhs(*this);
	
	if(lhs==rhs || lhs>rhs)
		return true;
	else
		return false;
}
 
/* Equal to Function*/ 
bool HugeInt::operator ==(const HugeInt& rhs) const 
{
	for (int x=39; x>=0; x--)
	{
		if (rhs.digits[x] < digits[x])
			return false;
		if (rhs.digits[x] > digits[x])
			return false;
	}
	return true;
}
 
/* Not Equal Function */ 
bool HugeInt::operator !=(const HugeInt& rhs) const 
{
	HugeInt lhs(*this);
	
	if(lhs==rhs)
		return false;
	else
		return true;
}
 
/* Zero Check Function */ 
bool HugeInt::operator !() const 
{
	HugeInt lhs(*this);
	
	if (lhs==0)
		return true;
	else
		return false;
}
ostream& operator <<(ostream &output, HugeInt &outVal)
{
	for(int i = outVal.getLength() - 1; i>=0; i--)
		output<<outVal.digits[i];
 
	if (outVal == 0)
		output<<"0";
 
	return output;
}
 
istream& operator >>(istream &input, HugeInt &inVal)
{
	char in[40];
	int i = 0;
	int j = 0;
 
	input>>in;
 
	while(in[i] != 0)
		i++;
	
	for(; i>0; i--)
	{
		inVal.digits[j] = in[i-1] - '0';
		j++;
	}
 
	return input;
}
 
/* HugeIntTester.cpp */
 
/* ** Description: 
     - Holds large, unsigned integers and overload the operators that might be usefuol when working with
			- arithmetic, relational, & I/O stream operators
  ** Date Due: Prior to 4/7/09
  ** Date Submitted: 4/10/09 @ approx 4:30pm (3 Days Late)
*/
 
#include "lab4_HugeInt.h"  
#include <iostream>
 
using namespace std;
 
/* Main Program */ 
int main()
{
	char DOIT = 'y';
 
	while (DOIT == 'y')
	{
		HugeInt a = 0;
		HugeInt b = 0;
		HugeInt c = 0;
		HugeInt d = 0;
		
		cout << "Input h1: ";
		cin >> a;
		cout << "Input h2: " ;
		cin >> b;
		
		/* Addition */
		cout << endl << "h1 +  h2 = " << a+b<< endl;
 
		/* Subtraction */ 
		if((a-b).getInteger()== -1)
			cout << "h1 -  h2 = undefinded" << endl;
		else
			cout << "h1 -  h2 = " << a-b << endl;
 
		/* Multiplication */ 
		cout << "h1 *  h2 = " << a*b << endl;
 
		/* Division */ 
		cout << "h1 /  h2 = " << a/b << endl;
 
		/* Less Than */ 
		if (a<b)
			cout << "h1 <  h2 = True" << endl;
		else
			cout << "h1 <  h2 = False" << endl;
 
		/* Less than or equal to */ 
		if (a<=b)
			cout << "h1 <= h2 = True" << endl;
		else
			cout << "h1 <= h2 = False" << endl;
 
		/* Greater Than */ 
		if (a>b)
			cout << "h1 >  h2 = True" << endl;
		else
			cout << "h1 >  h2 = False" << endl;
 
		/* Greater than or equal to */ 
		if (a>=b)
			cout << "h1 >= h2 = True" << endl;
		else
			cout << "h1 >= h2 = False" << endl;
 
		/* Equal to */ 
		if (a==b)
			cout << "h1 == h2 = True" << endl;
		else
			cout << "h1 == h2 = False" << endl;
 
		/* Not equal to */ 
		if (a!=b)
			cout << "h1 != h2 = True" << endl;
		else
			cout << "h1 != h2 = False" << endl;
 
		/* Zero Test for h1 */ 
		if (!(a))
			cout << "!h1      = True" << endl;
		else
			cout << "!h1      = False" << endl;
 
		/* Zero Test for h2 */ 
		if (!(b))
			cout << "!h2      = True" << endl;
		else
			cout << "!h2      = False" << endl;
 
		/* Copy */ 
		cout << "h3 =  h1 = " << (c=a) << endl;
		cout << "h4 =  h2 = " << (d=b) << endl;
 
		/* Add 200 */ 
		cout << "h1 + h2 + 200 = " << a+b+200 << endl;
 
		cout << "Test another pair of numbers? (y for Yes, n for No) ";
		cin >> DOIT;
		cout << endl;
	}
	
	return 0;
}

Open in new window

0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 24121195
>>>>      char in[40];
There is still a flaw.

You didn't initialize the in. Hence it is by accident if the chars are zero or not.

If using a temporary array somewhere always do

   char in[40] = { 0 };

and you are fine. That initializes *all* chars to zero.

>>>> input>>in;

as told it would be better to read each single char separately.

   char c;
   for (inVal.len=0; inVal.len < 40; ++inVal.len)
   {
       cin >> c;
       if (i == 0 && c == ' ') continue; // ignore leading spaces
       if (c < '0' || c > '9') break;  // break at first non-digit
       inVal.digits[inVal.len] = c - '0';      
   }

With that you could spare the second loop and make your stream operator robust against wrong inputs. Moreover, the inVal.len was correctly set (what doesn't seem the case with your functions????)
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilationā€¦
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may heā€¦
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question