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.

74 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
3answers
288 views

I'm having trouble printing the hashes and spaces. I've started with this, but it doesn't seem to work. Any ideas?

My code is down below. Everything above the for loop is fine. I need help with printing spaces and hashes. #include <stdio.h> #include <cs50.h> int main(void) { int h; do { printf("...
0
votes
2answers
252 views

pset1 Mario trouble

I've been working on this for days now, and have reached a point where I'm afriad I've gone further away from the LOGIC of the problem. At the moment, the complier doesn't print out line 16 and yet ...
0
votes
1answer
105 views

pset1/mario.c compiling erros

I have tried solving the issues and looking for answers everywhere but mario doesn't compile. When I try to make mario, it shows me the error message below. I removed the ; in line 24 after such ...
0
votes
1answer
332 views

pset 1 mario space help

I am having a problem printing the spaces. The code I have gets the number as required. It prints out the number of hashtags desired based on user input. However, there are no spaces. Where can I ...
0
votes
3answers
178 views

pset1 mario. can't fix errors, please help!

I can't understand what's wrong with the code. I've changed it many times, but errors are always similar.Can anyone please check the code and tell what's wrong?
0
votes
0answers
161 views

User input on Mario-isn't asking to retry

I'm wondering if this is the correct code for getting the user input for Mario. It isn't asking the user to "retry", but just asking for an integer over and over until it meets the parameters. ...
0
votes
0answers
120 views

mario.c expected identifier or '(' { and mario help

When I try running the mario program, this is what happens. Also i think i might be doing this wrong, can someone guide me in the right direction?
0
votes
0answers
137 views

I can't compile my code for pset 1 and I don't know why

I don't know what the problem is, it says the error was the lack of an "expected identifier or '('"
0
votes
2answers
463 views

pset1 Mario. Spaces work, hashes don't and i can't see why

So I have been working on CS50's pset 1, making marios half pyramid. I have been looking over other problems on this site and I've gotten this far. But I can't seem to see what the problem is with my ...
0
votes
3answers
267 views

loop questions with mario

hi i'm having trouble with making the pyramid in regards to the for loop for (int x = 0; x < n; x++) am i supposed to look at x as starting as first row? if so, is the second for loop be the ...
0
votes
1answer
176 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
657 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
264 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
183 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 ...
-1
votes
1answer
54 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
129 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
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
896 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:
-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
810 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
2