google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Monday, January 9, 2017

Palindrome triangle


    Write a program in C to print print palindrome triangle pattern of n rows.


    How to print a right triangle of palindrome strings using for loops.

 

Palindrome triangle pattern of 5 rows:

A
ABA
ABCBA
ABCDCBA
ABCDEDCBA

Required Knowledge

    For Loop
    If Else Statement
    printf and scanf function in C


 Algorithm to print triangle pattern of palindrome strings
This program is similar to right triangle star pattern program.

    Take the number of rows(N) of right triangle as input from user using scanf function.
    Number of characters in Kth row is always 2K-1. 1st row contains 1 character, 2nd row contains 3 characters, 3rd row contains 5 characters and so on.
    In any row, we will first print the characters in increasing order of their ASCII value till mid of the row and then in decreasing order.
    We will use two for loops to print right triangle of palindrome strings.
        Outer for loop will iterate N time. Each iteration of outer loop will print one row of the pattern.
        Each iteration of inner loop will print a palindrome string as explained above.

C program to print palindrome triangle pattern

#include<stdio.h>

int main() {
   int i, j, rows, count=0;
  
   printf("Enter the number of rows\n");
   scanf("%d", &rows);
   
   for (i = 1; i <= 2*rows; i=i+2)
    {
      for (j = 1; j <= i; j++)
        {
               printf("%c", 'A'+count);
               if(j <= i/2)
                       count++;
                else 
                       count--;
              }
           count = 0;
          printf("\n");
       }
   return(0);
}

Output

Enter the number of rows
5
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA

Keyboard shortcuts of computer

Interesting keyboard shortcuts for Various Applications You May Not know About Computer and The Internet.๐Ÿ˜Š


More than 100 keyboard shortcuts keyboard shortcuts (Microsoft Windows).
๐Ÿ‘‡
1.CTRL + C ( copy )
2.CTRL + X ( Cut )
3.CTRL + V (Paste)
4.CTRL + Z (Undo)
5.DELETE (Delete)
6.SHIFT + DELETE (delete the selected item permanently without placing the item in the Recycle Bin ).
7.CTRL while dragging an item ( Copy the selected item ).
8.CTRL+ SHIFT while dragging an item (Create a shortcut to the selected item )
9.F2 Key (Rename the selected item .
10.CTRL + RIGHT ARROW (Move the insertion point to the beginning of the next word )
11.CTRL + LEFT ARROW (Move the insertion point to the beginning of the previous word )
12.CTRL +DOWN ARROW (Move the insertion point to the beginning of the next paragraph )
13.CTRL + UP  ARROW (Move the insertion point to the beginning of the previous paragraph )
14.CTRL + SHIFT with any of the arrow keys (Highlight a block of text ) CTRL with any of the arrow keys. ( Select more than one item in a window or on the desktop , or Select text in a document
15.CTRL + A (Search + all )
16.F3 key ( Search for a file or a folder )
17.ALT + ENTER ( View the properties for the selected  object )
18.ALT + F4 (close the active item , or quit the active program ).
19.ACT + ENTER (Display the properties the selected object ).
20.ACT + SPACE Bar
21.CTRL + F4  (Close the active document programs that enable you to have multiple documents open simltenously )
22.ACT + TAB ( Switch between the open item )
23.ACT + ESC ( cycle through item in the order that  they load had ben opened.)
24.F6 key ( Cycle through the screen elements in a window or on the destkop )
25.F4 key (Display the Address bar list in My Computer or Windows Explorer)
26.SHIFT +F10 (Display the shortcut menu for the active window)
27.ALT+SPACEBAR (Display the System menu for the active window)
28.CTRL +ESC (Display the start menu)
29.ACT  + Underlined letter in a menu name (Display the corresponding menu )
Underlined letter in a command name on an open menu (Perform the corresponding command)
30.F10 key ( Activate the menu bar in the active program)
31.RIGHT ARROW
32.LEFT ARROW
33.F5 key
34.BACKSPACE
35.ESC (cancel the current task)
36.SHIFT when you insert a CD- ROM into the CD-ROM drive (Prevent the CD-ROM from automatically playing)

Dialog Box - Keyboard Shortcuts
1. CTRL +TAB (Move forward through the tabs)
2. CTRL + SHIFT +TAB (Move backward  through the tabs)
3. TAB (Move forward through the options)
4. SHIFT + TAB ( Move backward through the options)
5. ALT + Underlined letter (Perform the corresponding command or select the corresponding option )
6. ENTER (Perform the command for the active option or button )
7. SPACE-BAR (Select or clear the check box if the active option is check-box)
8. Arrow keys (select  a button if the active option is a group of option button )
9. F1 key (Display Help )
10. F4 key (Display the items in the active list)
11. BACKSPACE ( Open a folder one level up if a folder is selected in the Save As Open dialog box)

Microsoft Natural Keyboard Shortcuts
1. Windows Logo (Display or hide the Start menu)
2. Windows Logo + BREAK (Display the System Properties dialog box)
3. Windows Logo + D (Display the desktop )
4. Windows Logo + M (Minimize all the window)
5. Windows Logo + SHIFT  + M  (Restore the minimized window)
6. Windows Logo + E (Open My computer)
7. Windows Logo + F (Search for a file or a folder )
8. CTRL + Windows Logo + F (Search for computers)
9. Windows Logo  + F1 ( Display Window Help )
10. Windows Logo + L (lock the keyboard)
11. Windows Logo + R (Open the Run dialog box)
12. Windows Logo + U (Open the Utility Manager)

Accessibility Keyboard Shortcuts
1. Right Shift for eight seconds ( Switch Filter Keys either ON or OFF )
2. Left ALT + left SHIFT + PRINT SCREEN ( Switch high Contrast either ON or OFF )
3. Left ALT + left SHIFT + NUM LOCK (Switch the Mouse keys either ON or OFF)
4. SHIFT five times  (Switch the Sticky-keys either ON or OFF)
5.  NUM LOCK for five seconds ( Switch the Toggle-keys either ON or OFF)
6. Windows logo +U (Open Utility Manager )

 Windows explorer Keyboard Shortcuts
1.END ( Display the bottom of the active window)
2. HOME (Display the top of the active window)
3. NUM LOCK + Asterisk sign (*) ( display all of the sub-folders that are under the selected folder)
4. NUM LOCK + PLUS sign (+) (Display the contents of the selected folder)

MNC Console keyboard shortcuts

1. SHIFT + F10 ( Display the Action shortcut menu for the selected item )
2. F1 key ( Open the Help topic , if any , for the selected item )
3. F5 key ( Update the content of all console windows)
4. CTRL +F10 ( Maximize the active console windows)
5. CTRL + F5 ( Restore the active console windows)
6. ALT + ENTER ( Display the Properties dialog box, if any, for the selected item)
7. F2 key ( Rename the selected item )
8. CTRL +F4 ( Close the active console window . When a console has only console window , this shortcut close the console)

Remote Desktop Connection Navigation
1. CTRL + ALT +END ( Open the Micosoft Wiindow NT Security dialog box )
2. ALT + PAGE UP ( Switch between from left to right)
3. ALT + PAGE DOWN ( Switch between program from right to left)
4. ALT + INSERT ( Cycle through the programs in most recently used order)
5. ALT + HOME ( Display the START menu)
6. CTRL +ALT +BREAK (Switch the client computer between a window and a full screen)
7. ALT + DELETE ( Display the Windows menu )
8. CTRL + ALT + Minus sign (-) ( Place a snapshot of the active window in the client on the Terminal server clipboard and provide
the same functionality as pressing  PRINT SCREEN on a local computer.)
9. CTRL + ALT + Plus sign (+) ( Place a snapshot of the entire client window area on the Terminal server clipboard and provide
the same functionality as pressing  ALT+PRINT SCREEN on a local computer.)

Microsoft Internet Explorer Keyboard Shortcuts
1. CTRL + B (Open the Organize Favorites dialog box)
2. CTRL + E ( Open the Search  bar)
3. CTRL + F ( Star the Find Utility)
4. CTRL + H ( Open the History bar)
5. CTRL + I ( Open the Favorites bar)
6. CTRL + L ( Open the Open dialog box)
7. CTRL + N (Start another instance of the browser with the same Web address)
8. CTRL + O ( Open the Open dialog box, the same as CTRL + L)
9. CTRL + P ( Open the Print dialog box )
10. CTRL + R ( Update the current Web Page)
11. CTRL + W ( Close the current window)

เค…เคš्เค›े เคตिเคšाเคฐ เค•เคฐे เคตिเคšाเคฐ

  เคชเคนเคšाเคจ เค•ी เคจुเคฎाเคˆเคถ, เคœเคฐा เค•เคฎ เค•เคฐें... เคœเคนाँ เคญी "เคฎैं" เคฒिเค–ा เคนै, เค‰เคธे "เคนเคฎ" เค•เคฐें... เคนเคฎाเคฐी "เค‡เคš्เค›ाเค“ं" เคธे เคœ़्เคฏाเคฆा "เคธुเคจ...