Questions tagged [mario]

mario.c, one of the assignments for Problem Set 1, asks you to develop an algorithm to draw an ASCII art staircase similar to those seen in the classic Nintendo game.

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

Need help with code for mario

I created a loop to print the required spaces and a loop to print the required hashes. The program works. However, checkcs50 doesn't like it. Here are checkcs50 statements: :( handles a height of 0 ...
0
votes
1answer
177 views

pset1 mario compiles and works, but cs50 shows error in compiling

My mario.c compiled and worked fine. But when I try to check it with cs50 check, it gives me these errors: :) mario.c exists :( mario.c compiles \ expected an exit code of 0, not standard error of "...
0
votes
1answer
709 views

Problem with "expression result unused error" in for-loop?

I am getting an error message of "expression result unused" for the bottom two for loops (specifically h + 1 and s - 1). I've tried looking for through the other questions for an answer but nothing ...
0
votes
3answers
268 views

How to apply my formula in pset1 mario.c for draw?

#include <cs50.h> #include <stdio.h> /*I know that for the number of rows for ( ; i < h; ) can help, I think spaces work like (h-1) or (h--); and hashes (i + 1)*/ int main(void) { ...
0
votes
2answers
186 views

pset1 mario Initializing for loop from GetInt

I'm running the Mario program and I have everything working except the correct count, which I can fix. The only issue I'm having is a syntactical one. I'm tying to initialize the "for loop" with the ...
0
votes
2answers
194 views

What is wrong with this mario pset1?

#include <stdio.h> #include <cs50.h> int main (void) { int n; do { printf("Height: "); n = GetInt(); if (n == 0) { return 0; ...
-1
votes
2answers
111 views

Pset1 Mario- Can't put the user value in to loop!

I finished the mario assignment but I'm stuck at one point. I could not make the program ask the same question again and again until the user gives a valid number. I know I should put it in a loop but ...
-1
votes
2answers
3k views

mario.c-printing of pyramid tower

jharvard@appliance (~/Dropbox/pset1): make mario clang -ggdb3 -O0 -std=c99 -Wall -Werror mario.c -lcs50 -lm -o mario jharvard@appliance (~/Dropbox/pset1): check50 2014/x/pset1/mario mario.c :) ...
-1
votes
2answers
343 views

SUCCESS!!!!!!!!!!!!!!!!!!!!!!!!!! mario.c, Pset1 !

so MANY thanks to all that helped me!! ALL GREENLIGHTS BABY!!!
-1
votes
1answer
1k views

Validating the input in mario.c

I have followed fairly closely to one of the examples in earlier CS50 lecture course and Dr. Malan's walk through except I have used the integer variable ht instead of n. In view of this I am somewhat ...
-1
votes
1answer
1k views

pset1 mario less code problem

I have a problem with my code about mario.c... I was trying the whole evening as I am a newbie Here is my screenshot. Thanks in advance . #include <cs50.h> #include <stdio.h> int main(...
-1
votes
1answer
89 views

Please help! I made the condition, but I don't know how to make the half-pyramid [closed]

#include <stdio.h> #include <cs50.h> #include <math.h> int main(void) { int pyramid_height = 0; while (0 >= pyramid_height || pyramid_height >= 24) { ...
-1
votes
2answers
112 views

Mario's Pyramid Issue

I did the Mario's Pyramid exercise in pset1, and I got the program to work after hours of trying and for whatever reason whenever I run check50 it says it doesn't work and I can't seem to figure out ...
-1
votes
1answer
155 views

Pset1 Spaces not decrementing

I have spent hours trying to figure this out and as a last resort. My problem is with Pset one Mario. The loop for the spaces is executing but not ruducing the number of spaces after each run of the ...
-1
votes
1answer
55 views

pset1 ------------ mario less

I am not understanding as to what is expected when it says " rejects a height of -1 expected program to reject input, but it did not" what is "reject input"? please help
-1
votes
1answer
219 views

Problem Set 1 - mario.c (Help)

So after scratching my head for a long time I figured out the algorithm to approach the "Itsa Mario" program. This is the code I wrote and I am horribly stuck. The compiler gives errors when I try to ...
-1
votes
1answer
130 views

I don't understand this code

[code hidden to comply to academic honesty] This is someone else's work, and I was just trying to understand it, and I don't understand the lines that start with "for". What does it do? How does it ...
-1
votes
1answer
97 views

I've got Mario.c working almost! One last loop problem!

I've got the meat of it down; the code works fine in terms of printing the pyramid. But I'm having issues restricting the use to the number limit specification. Here's my code: #include <stdio.h&...
-1
votes
1answer
259 views

I need help with pset1 mario. Can't print the pyramid

I can get the users input but i cant print the pyramid. i can only get the spaces on the first line. Plus this is the same part that i got stuck on last year and i am only 13.
-1
votes
1answer
200 views

Why is the CS50 check not saying yes to 1, 2, 24 and 23?

I have pictures below. Please could you explain what I've done wrong?
-1
votes
1answer
139 views

My code for mario only produces one hash and I can't see why

I've been working for hours and I think I'm finally close to the solution, but I create the program and only one hash appears after the prompt for the height. please take a look at my code and let me ...
-1
votes
1answer
916 views

Pset 1 pseudocode conundrum

I've done loads of searching and sifting through the threads/walkthroughs/etc. without getting to any further clarity on this Problem Set. I find myself understanding (for my part) the lot of ...
-1
votes
1answer
148 views

Error in mario.c output

My code output looks like: But still check50 shows the following error:
-2
votes
1answer
120 views

Mario Pyrmaid on wrong side & single hash starting on top

Mario Pyramid Pset1. Increments hashes and decrements the spaces to create a pyramid. This is as far as I got so far... I can only have a single hash at the top of the pyramid, wanting 2. Hashes need ...
-3
votes
1answer
131 views

What's wrong with my Mario code?

I'm stuck on pset1 with the for loops. I think I got the idea but the output is wrong. Does anyone know why? My faulty pseudo-code is below. Move your mouse on top of it to reveal it if you've ...
-8
votes
2answers
817 views

mario8.c Clang compiling errors

Being a novice to C language programming,my initial attempts consisted of several syntax errors. As per the advice hence I have been reading the lecture notes concentrating on syntax and wanted to ...

1
6 7 8 9
10