Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

my code has bugs. mario.c:11:1: error: expected identifier or '(' while (height

my code has bugs. mario.c:11:1: error: expected identifier or '(' while (height <= 0 || height <= 23) ^ mario.c:13:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] height = get_int(); ^ mario.c:13:10: error: initializer element is not a compile-time constant height = get_int(); ^~~~~~~~~ /usr/include/cs50.h:187:71: note: expanded from macro 'get_int' #define get_int(...) __extension__ IF_ELSE(ISEMPTY(__VA_ARGS__))(WARN(get_int(NULL)))(get_int(__VA_ARGS__)) ~~~~~^~~~~~~~~~~~~~ /usr/include/cs50.h:121:20: note: expanded from macro 'WARN' #define WARN(func) func ^~~~ /usr/include/cs50.h:67:19: note: expanded from macro 'IF_1' #define IF_1(...) __VA_ARGS__ IF_1_ELSE ^~~~~~~~~~~ mario.c:14:1: error: expected identifier or '(' { #include #include int main(void) { int height; height = get_int(); printf("Give me an integer "); get_int(); } while (height <= 0 || height <= 23) printf("Give me another integer "); height = get_int(); { for(i = 0; i < height; i++) { for(j = 0; j < height; j++) printf(" "); } printf(" "); for(i = 0; i < height; i++) { for(j = 0; j < height; j++) { if(i >= j) printf("#"); } printf(" "); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions