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
-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 :) ...
0
votes
1answer
129 views

Having Trouble tackling corner cases for Mario

I am having issues tackling the corner cases for Mario (e.g. height < 0 or height > 23). I'm assuming you prompt the user to keep entering an integer in a while loop until he/she has entered an ...
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 ...
-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 ...
0
votes
2answers
82 views

Mario program and logical errors

After the Syntax errors are fixed,and after compiling with no errors is it actually possible to actually run the program and see the print out of the half Pyramid to check the logical errors in the ...
1
vote
1answer
754 views

Why Does mario Not Pass check50 Tests?

Having issues passing check50's tests for mario. I looked at other issues, including ones that look the same as mine, but I haven't found a solution. My code seems to give the desired results as ...
0
votes
3answers
830 views

do while loop not working?

I used these condition in do while loop , and I still getting the forever loop. It just doesn't stop. while( x > 0 || x < 23);
0
votes
2answers
3k views

pset1 error: expected 'while' in do/while loop [duplicate]

I am getting a strange error. What does it mean? I moved stuff around and changed stuff but it won't stop. #include <stdio.h> #include <cs50.h> int main(void) { int num; { ...
2
votes
1answer
29k views

C syntax errors like “expected expression”

I completed an introduction to programming using Python and I am more used to Python then C, so I might mix the two up. C is giving me all kinds of errors. I tried changing things but noting seems to ...
0
votes
5answers
414 views

Errors Running mario

A few days ago, this program ran correctly, but now it's showing errors. I tried to find the problem, but I don't understand what these error message mean. What am I doing wrong? jharvard@appliance (~...
0
votes
1answer
134 views

Pyramid problem compiling errors

I am getting two compiler errors. What do these errors mean and how can I eliminate them? jharvard@appliance (~/Dropbox/pset1): make mario clang -ggdb3 -O0 -std=c99 -Wall -Werror mario.c -lcs50 -...
0
votes
3answers
368 views

Output on Mario

I am not sure how to get the code working the way I want. I think it should make sense. Should I change my approach on the output section to do...while? int height, space, hash; do { ...
1
vote
2answers
912 views

How to Handle the Height of 0 Correctly?

I've completed the mario program and it works fine! When I re-checked the pset specification page, I found that I should accept non-negative integer no greater than 23. So I edited my code to ...
5
votes
4answers
2k views

Completely lost.. pset1, Mario help

I am completely stuck. I'm not quite sure why I don't understand how to do this. I don't understand the hash tag and spaces thing. I have read so many explanations of it on this website, but none of ...
3
votes
3answers
3k views

Stuck on PSet1: I have the correct output, but Check50 says it's wrong

I'm stuck on the Mario part of PSet1. I've managed to write up my program and the output is always correct (or at least seems to be to me). I know it's definitely the loops that are making things ...
0
votes
2answers
2k views

How to build the pyramid in pset 1?

I'm stuck on the mario problem in pset1! How should I start going about printing the half pyramid? I already figured the user input part...
2
votes
2answers
233 views

How to Convert Integers to Spaces/Hashes?

I am stuck at converting the integer input I get from the user into spaces/hashes. How to use this integer with my printf() function to print spaces/hashes?
0
votes
1answer
171 views

Reject empty/blank user input

For pset1 I want to reject an empty user input, so that when the user presses 'enter', either the Mario code runs or it gives the user an error message. Pseudo code: printf ('message to input 1-23'...
1
vote
5answers
8k views

What's wrong with my code for mario?

I've been stuck on pset1 for five months now. I like to do things chronologically and mario has been giving me headaches. Every time I think I have the problem solved, I'm told it's wrong or a lot is ...
0
votes
3answers
685 views

Mario Pyramid - Check50 - Unexpected end of input

Does anyone know what this means? I'm getting the correct output from my program and this is the only message I get from check50.

1
6 7 8 9
10