Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***********************************************/
- /** 20140409 Classwork_0409 Question 1 Answer **/
- /** Maker : Yan **/
- /** E-Mail : [email protected] **/
- /** Date : 2014/04/09 pm.10:27 **/
- /***********************************************/
- #include <stdio.h>
- #include <stdlib.h>
- void main()
- {
- printf("Enter a number: ");
- int input = 0;
- scanf("%d", &input);
- for(int i = 1; i <= input; i++)
- {
- for(int j = 1; j <= input; j++)
- {
- if(i == 1 || j ==1 || i == input || j == input)
- {
- printf("*");
- }
- else if(i == j)
- {
- printf("*");
- }
- else
- {
- printf("?");
- }
- }
- printf("\n");
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment