Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
c++ x 19
java x 9
Member Avatar for webdragon89

I have to implement Warnsdorff's Rule via an algorithm given to me by my professor. I've gotten it to work however one thing that I can't get to work is for the ending point to be one "knight's move" away from the starting point. This is my code so far. …

0
94
Member Avatar for webdragon89

I have the code to print prime numbers but I can't figure out how to print the numbers 8 to a row. This is because I have to find all the prime numbers <200. [CODE]import java.util.Scanner; public class PrimeNumbers { public static void main(String[] args) { Scanner input = new …

Member Avatar for hiddepolen
0
626
Member Avatar for webdragon89

I have to write a program to "encrypt and decrypted" some text. For example if I input: FACHHOCHSCHULE with a password of: TIGER it should encrypt to: YIILYHKNWTACRI which I got working but when I try to reverse the process I get numbers, letters and symbols. Please help. [CODE]#include <iostream> …

Member Avatar for Grimm#13
0
686
Member Avatar for webdragon89

I have: [CODE]void hughint::operator *=(hughint y) { int i,t1,t2,prod,remainder; int carry=0; for(i=num.length()-1;i>=0;i--) { t1=(int)get(i)-(int)('0'); cout<<"t1: "<<t1<<endl; t2=(int)y.get(i)-(int)('0'); cout<<"t2: "<<t2<<endl; if(carry>0) { prod=(t1*t2)+carry; remainder%=10; carry=remainder/10; } } }[/CODE] I'm using 123*100 and the answer I keep getting is 123. Help please.

Member Avatar for mattjbond
0
107
Member Avatar for webdragon89

I have a 3x3 matrix with values: (0,0)=3 (1,1)=4 (2,0)=2.4 the rest of the values are zero and the code: [CODE]#include <iostream> using namespace std; class sMatrix { public: sMatrix(); sMatrix(int,int); int getR(); int getC(); bool rValid(int); bool cValid(int); void setEl(int,int,double); double getEl(int i,int j); void print(); private: int nr, …

Member Avatar for tetron
0
390
Member Avatar for webdragon89

[CODE]#include <iostream> using namespace std; class sMatrix { public: sMatrix(int,int); sMatrix (sMatrix&); int getR(); int getC(); bool rValid(double); bool cValid(double); void setEl(double,double,double); double getEl(int i,int j); int getVal(); void print(); void add(sMatrix&); private: int nr, nc; //number of row and cols int nent; //number of entries int nmax; //the max …

Member Avatar for Nick Evan
0
267
Member Avatar for webdragon89

I have the following code: my add function and M.add(N) statement keeps turning up errors I'm not sure how to fix it. I also need a getVal function but I'm not sure what to do with it. [CODE]#include <iostream> using namespace std; class sMatrix { public: sMatrix(int,int); int getR(); int …

Member Avatar for Nick Evan
0
112
Member Avatar for webdragon89

If I where to have a matrix of say: 123 456 789 How would I write a getVal() functions so that row[0]col[0]=1 and so for?

Member Avatar for webdragon89
0
95
Member Avatar for webdragon89

I need to write an overloaded function for a pascal triangle. I have to include another function that fits n!/((n-r)!r!), I can't figure it out. Help please! This is what I have so far: [code] #include "stdafx.h" #include <iostream> using namespace std; int my_fib(int,int); int x,y,j; int main() { x=0; …

Member Avatar for kvprajapati
0
102
Member Avatar for webdragon89

I have n!/((n-r)!r!) which I figured out how to make recursive: [CODE]int crn (int n, int r) { if (r==0||r==n) return 1; return (n-1)+(n-1,r-1); }[/CODE] how do I make it non-recursive?

Member Avatar for Agni
0
119