Questions tagged [for]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
55 views

pset1 cash less, problem using for loops

I tried to use for loops to solve the cash (less) problem set, not sure if thats possible. Can this code be fixed or do I need to use while loops instead? the code compiles, but the output is either (...
0
votes
0answers
482 views

PSET6 DNA [SPOILER]

during solving the dna problem i had a hard time trying to work out the large database " the small one work just fine" anyway i reached to this abstract solution to get "scores" of the sample dna so ...
0
votes
1answer
15 views

My for loop in vigenere will not execute

The for loop is not running and I cant figure out why. Everything looks good to me. I need some fresh eyes. Thanks guys! #define _XOPEN_SOURCE #include <stdio.h> #include <unistd.h> #...
0
votes
1answer
30 views

Decreasing For Loops

I'm sure this is a very basic question but I'm struggling with this. Why can't I make a decreasing "For" loop? My code is below. Why doesn't this work? I just want to output "Decreasing, 4" "...
0
votes
1answer
85 views

PSET2 Caesar Bug in Uppercase Case For Loop

having an issue with caesar.c. I've got a loop working for lowercase cases where the key size would cause the key to loop out of alphanumeric characters, but when I try to implement the same loop for ...
0
votes
1answer
10 views

for cicle itrations

hi guys im wrote testing program to test features for my function and there is only 7 iterations in my for cicle but i malocc`ed more then that tell me why pls(testing string was andrew8mike) #...
0
votes
1answer
42 views

won function does not seem to return true (even though it should)

So this has been a little frustrating. Even though the rest of the problem went well I cannot figure out where I went wrong. Here's the idea; set a counter called value that increments by every time ...
0
votes
1answer
63 views

Parentheses or Brackets Problem?

I get this error, but I can't find where I forgot a paren / bracket... int SUM1 = 0; if ( (length == 13) || (length == 15) ) { for (int a = 1; a < length; a++2) { ...
1
vote
1answer
200 views

pset2 caesar, argv[1]

Ok I'm consistently encountering a peculiar issue that I can't get my head around. this loop should return an error if there is a character other than a digit. When I give a character other than a ...
0
votes
1answer
25 views

I have a nested for loop, with if conditions that won't print out

My vigenere program, compiles and has most of the check50 test-thingy right. However, I cannot get the program to print out the cipher. Not sure what is legal here or not but I have gone over and ...
1
vote
1answer
516 views

still needing help with mario

I have read and re-read through the help provided for mario here and other places, but am stuck at getting the right number of lines, but not the right characters in each line (i am substituting a for ...