Thread: give me some idea..

1. give me some idea..

how can i solve this problem...
nid to input a number and will output **** that will form look like the number i input..

304=** will be look like 304

2. I think what you want is this
Code:
```#include <stdio.h>

int main()
{
int Number;
scanf("%d", &Number);
printf("%d\n", Number);
return 0;
}```

3. but how will it print **** that will form look like the number i input?

4. The phrase, "how will it print **** that will form look like the number i input?" doesn't make any sense, so try rewording.

5. put each digit in an array i.e
Code:
`int na[3] = {3,0,4};`
then simply use a switch or if statment and print each number's symbol in a loop
i.e
Code:
`if(na[i] == 0) printf(" * \n* *\n *\n");  // display zero symbol`
this will however print the number symbols vertically down the screen
it is much harder to print horizontal

6. Originally Posted by rothj0hn
304=** will be look like 304
Do you mean that if the user inputs 304, your program should display a bunch of spaces and "*" characters that take the form of the digits "3", "0", and "4"?

There are several ways to do that. I'd suggest starting with some graph paper and work out the "bitmaps" for each digit character. Figure out how to store the pattern for each of those 10 characters in a C program, and how to display those patterns side-by-side.

If you don't understand arrays in C, you should learn about them before you attempt this programming task.

7. ei

actually im trying to use a gotoxy(x,y)
bunch of gotoxy until i formed a number figure made of ****...
but i doubt that my program wont be flexible..
coz ive only made a number figure made of ***** from 0-9
single digits only.. problem is if input is 3digits or more.. i cant produce any output..

8. So paste the code that you wrote to draw say zero.

Popular pages Recent additions