C program to print box number pattern of 1 with 0 center

Write a C program to print the given box number pattern of 1 with 0 center using loop. How to print box number pattern of 1’s with 0 as center using for loop in C programming. Logic to print box number pattern with different center using for loop in C program.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
11111
11011
11111
11111

Read more

C program to print box number pattern with 1 and 0

Write a C program to print the given box number pattern with 1’s and 0’s using loop. How to print box number pattern using one’s and zero’s using for loop in C programming. Logic to print box number pattern with 1’s as border and 0’s at center in C program.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
10001
10001
10001
11111

Read more

C program to print number pattern with 1, 0 at alternate columns

Write a C program to print the given number pattern series of 1’s and 0’s at alternate columns using loop. How to print number pattern with one’s at even column and zero’s at odd column using for loop in C programming. Logic to print given number pattern of 1 and 0 at alternate columns.

Example

Input

Input rows: 5
Input columns: 5

Output

01010
01010
01010
01010
01010

Read more

C program to print number pattern with 1, 0 at alternate rows

Write a C program to print the given number pattern of 1’s and 0’s at alternate rows using loop. How to print square number pattern of one and zero with one at odd row and zero at even row using loop in C programming. Logic to print number pattern of 1 and 0 with alternate rows.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
00000
11111
00000
11111

Read more

C program to print 0 or 1 square number pattern

Write a C program to print the given 0, 1 square number pattern using loop. C program to print binary number pattern of n rows and m columns using loop. How to print the square number patterns using for loop in C programming. Logic to print the square filled with 1 using for loop in C program.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
11111
11111
11111
11111

Read more

C program to swap first and last digit of a number

Write a C program to input a number from user and swap first and last digit of the given number. How to swap first and last digits of a number in C programming. Logic to swap first and last digit of a number in C program.

Example

Input

Input any number: 12345

Output

Number after swapping first and last digit: 52341

Read more

C program to convert Hexadecimal to Decimal number system

Write a C program to input hexadecimal number from user and convert it to Decimal number system. How to convert from Hexadecimal number system to Decimal number system in C programming. Logic to convert hexadecimal to decimal number system in C programming.

Example

Input

Input hexadecimal: 1A

Output

Decimal number: 26

Read more

C program to convert Hexadecimal to Octal number system

Write a C program to input Hexadecimal number from user and convert it to Octal number system. How to convert Hexadecimal number system to Octal number system in C programming. Logic to convert hexadecimal to octal number system in C programming.

Example

Input

Input hexadecimal: 1A

Output

Octal number: 32

Read more

C program to convert Hexadecimal to Binary number system

Write a C program to input hexadecimal number from user and convert to binary number system. How to convert hexadecimal number system to binary number system in C program. Logic to convert hexadecimal to binary number system in C programming. Example Input Input hexadecimal: 1A Output Decimal number: 26 Required knowledge Basic C programming, Switch … Read more

C program to convert Octal to Hexadecimal number system

Write a C program to input octal number from user and convert to hexadecimal number system. How to convert from octal number system to hexadecimal number system in C program. Logic to convert octal to hexadecimal number system in C programming.

Example

Input

Input octal number: 175

Output

Hexadecimal number: 7D

Read more