Tags » WeTheComputerGuys

Break String using index and separator

– Read the string character by character and store it in output string until a separator is encountered.
– Create a count variable that keeps a track of number of times this separator has occurred. 136 more words

WeTheComputerGuys

Transpose of a matrix

Transpose Of a Matrix is simply interchanging
the rows and columns of the matrix.

Note: If you have a n rows and m columns matrix the… 210 more words

WeTheComputerGuys

Pattern Printing – 40

To print triangular pattern we need two loops.
Inner Loop and Outer Loop
Inner Loop prints the rows
Outer Loop prints columns
In this pattern the logic observed is the decreasing difference… 115 more words

WeTheComputerGuys

Pattern Printing – 39

-Firstly we take input of height and width.
– We divide the pattern in 3 parts.
– Topmost row
– Central region
– Bottom row… 210 more words

WeTheComputerGuys

Pattern Printing – 38

We divide the pattern in 3 parts
– Upper 2 rows(blue)
– Central region(red)
– Bottom 2 rows(purple)

For upper 2 rows(blue)

– Print spaces… 172 more words

WeTheComputerGuys

Pattern Printing – 37

Write a program tho print this pattern.

This pattern has two parts to print:

  1. Spaces
  2. Numbers

To print this pattern we print the spaces first followed by numbers. 113 more words

WeTheComputerGuys

Pattern Printing – 36

Print this pattern shown in the image below using recursion.

This was for odd string length.The lower image shows for even string length.

This problem has to be solved using recursion. 428 more words

WeTheComputerGuys