Hello friends.

I am new at programming and need to programm "X" as an assignment (pic is attached)
The "X" should be arbitrarily large or small and the edge length of the "X's" should be entered by the user.

The code is below. Would highly appreciate any help:

include <stdio.h>
     int main () {
     int edge length, i;
     printf ("Please enter the edge length of the pattern: \ n");
     scanf ("% d", & edge length);

     char sign;
     character = '';

     for (i = 0; i <edge length; i ++) {
     printf ("-% c- \ n", character);

     }
     return 0;
     }

Recommended Answers

All 2 Replies

That line 8 looks to be, well, you tell me.

Not sure what that pic is supposed to be, but it looks like a webpage for a different site(spam?)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.