Ok Thanks I appreciate that.
Type: Posts; User: C_Nik
Ok Thanks I appreciate that.
Thanks thats what I love about programming. You learn something new everyday. I'll fix this pronto, but If I'm trying to compare two string characters doesn't the strcmp() function require you to...
This program compares two strings and outputs however many times the letter is found in the word the user inputs. I'm having a problem with it getting a segmentation fault and can't figure out why?...
@AndiPersti: Thanks I deleted that from my code since it was superfluous..
@Adak: Yea i was using the Durstenfeld version. It prints a simple table no problems
I'm getting different permutations but I get repeats... Anybody have any suggestions on how I can stop the repeats? I was thinking sending to another array and comparing...
#include...
Ok Thanks Adak! I'm going to check this out. Learning something new everyday! I appreciate this!
Thats the page I used to get the formula for finding the number of sets. But I'll read it again to see if I missed another statement.
LoL I'm thinking it is a sorting algorithm. It doesn't have to be in random order, if there is a similar sorting algorithm that probably what I need to use. Decrementing the outermost loop is what...
I'm writing a program to print out all permutations of a given set of numbers in a random order i.e. if the user selects 3 then it should print: (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1) and...
Thanks for the advice. I appreciate it a lot. I sat down and drew it out a couple of times and I see the pattern. The stars increase by 1+ each Col Number, but I can't figure out how to get the...
This program is supposed is to take the input of a odd integer and print a symmetrical diamond. The thing is, is that I've created a diamond but it isn't symmetrical. If the user enters '5' it should...
Ok apparently I have to press shift & enter when I input on Xcode... Thanks for the help everyone. Now I have to fix the return on the function. Thanks for spotting that error commonTater. Just...
Ok here is my current code. For some reason it won't run correctly on Xcode
#include <stdio.h>
#include <math.h>
/* Simple trigonometric program that calculates the length of the hypotenuse...
Using Xcode on Mac OS X 10.6.4... I never really had problems with the scanf function until recently when I started implementing functions into my code.
I just deleted the newline characters and still getting the same problem when I run the program and enter the value it doesn't do anything. Any suggestions?
When I run this program it doesn't take the scanf parameter the program just freezes and nothing happens can anybody help?
#include <stdio.h>
#include <math.h>
/* Simple trigonometric...
I've updated the code but now it only works when '2' is input by user. Producing a 2 x 2 square... here is the updated code
#include <stdio.h>
int main (int argc, const char * argv[])
{
...
I'm creating a simple program that asks the user to input the size of a box and then displays the box using asterisks. I'm have a problem with the rows printing. Here is the code that I have so...