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
1answer
140 views

pset6 mario/more - output is seemingly correct, however failing tests

I've just finished mario/more in pset6, however, it does not pass the tests. The actual and expected outputs are identical, so is the expected string. The pyramid also looks identical to the c ...
0
votes
4answers
723 views

mario.c; error message: expected identifier

I have been trying for more than a week to correct compiling error: mario.c:19:1: error: expected identifier or '(' The response I received did not help. #include <cs50.h> #include <stdio....
0
votes
1answer
6 views

Mario.c:19:36: error: use of undeclared identifier 'row'

I am not sure what I am doing wrong... I made 16 same errors of different identifiers but I am not sure why
0
votes
1answer
12 views

make: Nothing to be done for 'Mario'

I am confused.... :( Am I in the wrong directory?
0
votes
1answer
14 views

error: expected identifier or '(' I thought I had solved this

#include <cs50.h> #include <stdio.h> #include <math.h> int n; { do { n = get_int("Height: "); } while (n < 1 && n < 8); for (int i = 0; i < 8; i++) { ...
0
votes
1answer
125 views

Finished Mario week 1, but unsure if it's a proper solution

So I managed to get the intended result for Week 1 problem set 1 Mario (less comfortable), but I'm not sure if my solution would be considered good code. In line 11, is it ok to have subtracted by 1? ...
0
votes
1answer
107 views

MARIO!! just look over

what in the world is wrong with my code: #include <stdio.h> #include <cs50.h> int main(void) { int n; do { // prompt user for a number 0 to 23 n = get_int(); printf ...
0
votes
1answer
19 views

What is wrong with my Mario

could you please point out what I am doing wrong? I guess the problem is in the second loop - but how do I fix it? Thank you #include <cs50.h> #include <stdio.h> int main(void) { int ...
0
votes
3answers
529 views

check50 is getting a different result from me on mario

I have tested every criterion of Mario, and they all are met, but check50 is getting a different output than me. Here is a transcript of what happened. elephant1123@ide50:~/workspace/pset1 $ ./mario ...
0
votes
1answer
45 views

Help please with code Mario error

#include <stdio.h> #include <cs50.h> int main(void) { int pyramid_height = 0; do { printf("Height:"); pyramid_height = GetInt(); if (pyramid_height == 1)...
0
votes
1answer
31 views
0
votes
1answer
71 views

CS50 Terminal saying there's error in code that isn't there - More Comfortable Mario

Whenever I type Make Mario into the Terminal for the "More Comfortable" Mario.c assignment in Week 1, it keeps telling me I have an error on 13:9 - but there's nothing typed on 13:9. I'm a bit ...
0
votes
1answer
55 views

pset1: Printing too many hashes

for the past few weeks I've been struggeling with making the half-piramid in pset1. I managed to come up with this code that prints the height of the piramid according to the user input, but after ...
0
votes
2answers
39 views

mario more comfortable; "can't check until a frown turns upside down"

[EDIT: Code removed for Honor Code compliance.] The code seems to be running perfectly fine and gives the correct output But every time i try to check it, i get this: :) mario.c exists :( mario.c ...
0
votes
1answer
90 views

Failed to write to 'mario.c'. Failed to retrieve resource from vfs-gce-usw-289-4.c9.io

I ran Mario and one of the loops repeated forever. I exited the terminal and now I can't compile. I get this error message: Failed to write to 'mario.c'. Failed to retrieve resource from vfs-gce-usw-...
0
votes
1answer
82 views

Mario printing out backwards

Hello I am new to coding in c and not very familiar with it. I am getting the hash tags and I am using a - so I can see my spacing. Right now I am printing my pyramid the wrong way any help will be ...
0
votes
1answer
39 views

Valid output decreed as invalid by check50?

I am having trouble with check50 in pset1 more mario. Below as follows is my code, it works. Yet, for some reason it is invalid. I know it is wrong to post my entire code but I am stumped. #include &...
0
votes
1answer
50 views

Mario Less Loops doubt and code review

I have attempted the PSET 1 of 2020 CS50x and have a couple of doubts. Could someone check if the following code for Mario less one is correct. If it is I also had a question that what should I put ...
0
votes
1answer
57 views

I almost finished but my problem is with the side of the half-pyramid of mario

I finally reached the key for making this project but my problem is with the side of the pyramid i want it to be left sided instead. #include <cs50.h> #include <stdio.h> int main(void) ...
0
votes
1answer
127 views

Please help!! Pset 1: creating a pyramid

I have been struggling with pset1: creating a pyramid for a long time. I am reading other people's codes to learn the logic but I still cannot understand what is going on. Would you please explain the ...
0
votes
1answer
99 views

Confused.Pset 1 mario half pyramid

I am really confused with mario half pyramid in pset1. I only need some help just give me a hint if I going right till now and what can I do for the # #include <cs50.h> #include <stdio....
0
votes
2answers
280 views

Stuck on Mario Pset1

I'm stuck on Mario Pset1. I keep receiving line breaks, and the function seems to skip the nested for loops. #include <stdio.h> #include <cs50.h> int check(int b); int checktwo(int b); ...
0
votes
3answers
274 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
2answers
465 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
1answer
82 views

Understanding for loops and lingering questions I need answered before moving on!

I coded this and it passes. I just want to understand it much better than I do at this moment. I got hung up on a few of things and found the solutions online to those questions I was having but I ...
0
votes
1answer
196 views

Still needing help with Mario pyramid construction

I can't figure out how to make the pyramid work. My current code from the //create pyramid onward is: //create pyramid for (int k = n; k+1<n; k++) printf("%d", k); printf("#"); ...
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
85 views

I get the right pyramid, but the check function keeps telling me otherwise!

#include <cs50.h> #include<stdio.h> int main(void) { int height, row, hash, space; do { printf("Height: "); height = get_int(); } while(height < 0 |...
0
votes
1answer
407 views

pset1 Mario Help?

So I understand the bases of the project, what I'm suppose to do etc, but when I prompt the user I get a bug, it also loops forever when I enter a negative integer is that normal? The do and while ...
0
votes
1answer
55 views

pset1 mario uncomf - Hash's start in wrong place

I've ran into what appears to be a problem. I initially thought I finished this pset but when I was checking my work I noticed the #'s always started from the 8th character along the line? Even if I ...
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
1answer
136 views

Mario syntax error

Something's wrong with my function declarator, and i have a different error that I don't understand at all. Please help! Here is the code: #include <stdio.h> #include <cs50.h> int n; ...
0
votes
1answer
335 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
1answer
49 views

Prompt a user for a number. My code has an endless loop

i am trying to build a code in which the user should input a number between 1-5. In any other case the program should request the user to input a new number. My problem is that the program is going ...
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
1answer
2k views

Mario Less Comfortable, do-while loop problem

Hi everyone I made sure to do my research and go through the already posted questions. I am certain my while condition is wrong after research but don't understand the correction. my program runs but ...
0
votes
1answer
471 views

for loop mario.c

This is what I have for Mario.c less comfortable. I am having a problem printing the pyramid. Am I suppose to have a for loop for every space, #, and newline. for everyline. #=1 #
0
votes
1answer
185 views

pset6 how do we check for string in mario

I've tried to find out how to check for string input for mario.py. I know to check for the range of integers when getting input from the user, but if they enter a string instead of a number, is there ...
0
votes
2answers
140 views

Why isn't my block on pset1 turning into a staircase?

I am currently working on pset1 Mario, less comfortable. I am running my c to turn the hashtags into a staircase, but when I run the code, it is only a block. What is wrong with my code? Thank you all ...
0
votes
1answer
38 views

What does it mean when it says "error: expected ';' in 'for' statement specifier"? It is referring to " for (k <= n; k--)" ... what's wrong with that?

This is for the Mario pyramid. I am having trouble with it. I finally got the left sided one working but I can't figure out how to put my .s and my #s on the same line when trying to make the side ...
0
votes
1answer
126 views

CS50 Mario spaces and hashes

I am new to programming and sincerely appreciate any help. I am having difficulties getting the number of hashes and spaces working correctly. Below is my code. Thanks in advance for support. int ...
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
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
1answer
208 views

Mario pset1 a little hand please!

Spoiler alert code inside this link! !http://imgur.com/OIHvPFC I am having trouble with the mario, any tips of how i can get on with this? I have listed my integers at the start but maybe i over ...
1
vote
2answers
885 views

pset1 mario: please help with my code

The below is what I have come up so far and the result is very underwhelming. It just doesn't work out as I expected. The first part works well but I am struggling with the second one. Any help would ...
0
votes
1answer
24 views

I keep getting the following error when I use the Check50

You seem to be missing these required files: mario.c You are currently in: ~, did you perhaps intend another directory?
0
votes
1answer
159 views

I can get the correct height for my pyramid but I can't get the spaces or #s to add or subtract properly in my loop

{ for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { printf("%d\n", j); } for (int k = n; k < n + 2; k++) { printf("#"); } printf(" \n"); return (0); }
0
votes
1answer
129 views

Pset 1 Less comfortable - Number of Hashes

Sorry for the beginners's question. When I try to compile to following code for the Mario - Less Comfortable problem, I am printing the same number of hashes for each row and am unsure why. Code is ...
0
votes
2answers
117 views

mario less comfortable help

I wrote this code for the mario problem but idk if it's right. i'm having trouble running it. It keeps saying error: linker command failed with exit code. #include <cs50.h> #include <stdio.h&...
1
vote
1answer
96 views

PSET1 Mario pyramid - Can someone explain me the logic of this line of code?

I was able to make the Mario's pyramid from Problem Set 1, (I know it should be right alligned, not left). This is the code, and it is working fine when I execute the program, but I don't seem to ...

1
2 3 4 5
10