Thread: Strings and Characters in arrays.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    36
    nope now im gettin the wrong answer again

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    36

    Angry

    It seems you cant modulus a float or double,
    and when i do this....

    Code:
    int i;
    	double temp2;
    	int cseven[30];
    	long temp3;
    
    
    		  printf("\n Decryption: \n");
    	                        for (i=0; i<length; i++) {
    			  temp2 = pow(array1[i],7);
    			temp3 = temp2;
    			printf(" %ld \n ", temp3);
                                                     printf(" %ld \n ", temp3%33);
    			 }
    It seems to only work to an extent, if array1[i] is like over a certain number, it won't work. It works if array1[i] is 21, but not 26.
    so stuck.....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Removing Specific Characters from Strings
    By gfmartin05 in forum C++ Programming
    Replies: 4
    Last Post: 02-09-2009, 09:53 AM
  2. Strings and Substrings using arrays
    By dcwang3 in forum C Programming
    Replies: 12
    Last Post: 02-18-2008, 07:28 AM
  3. Problems with Strings and Arrays.
    By SlyMaelstrom in forum C++ Programming
    Replies: 13
    Last Post: 04-15-2005, 02:13 PM
  4. strings or arrays of characters?
    By Callith in forum C++ Programming
    Replies: 13
    Last Post: 12-26-2004, 11:28 AM
  5. Getting weird characters in Strings
    By steve8820 in forum C Programming
    Replies: 3
    Last Post: 09-18-2001, 02:49 AM