Friday, 28 June 2019

Rare variety of cow


News updates 28 June 2019

National News


1. BSES launches energy saving app
i. BSES Yamuna Power Ltd launches behavioural energy saving app 'Susthome'. 
ii. The app was launched as part of its Demand Side Management programme.
BSES partners with energy resources institute TERI, Panasonic India and the Council on Energy, iii. Environment and Water to launch the app.
iv. The other two initiatives are "Green Division concept and solar micro grids with battery storage". 
v.  BSES is a Delhi power distribution company. 
2. Maharaja Ranjit Singh honoured on his 180th death anniversary
i. A statue  of Maharaja Ranjit Singh, the legendary ruler of Punjab,  was unveiled at the Lahore Fort on his 180th death anniversary.
ii. Around 500 people crossed the Wagah border to attend the unveiling event. 
iii. The sculpture is the result of collaboration between Fakir Khana Museum and Sarkar Khalsa Foundation.

Summit and Conferences News


3. G-20 summit begins in Osaka
i. G-20 summit has begun in Osaka, Japan
ii. The theme of the summit is Human centred future society.
iii. 19 countries, the European Union and several special invitees are participating at the Osaka Summit.
Static/Current Takeaways Important For LIC AAO/ADO Mains:

The next G20 Summit will be hosted by Saudi Arabia in November 2020.


Awards


4. Indian woman crowned Miss Universe Australia
i. India born Priya Serrao has won the Miss Universe Australia title for 2019.
ii. Western Australia’s Bella Kasimba and another Victorian Marijana Radmanovic rounded out 2019’s top three, placing second and third.
Static/Current Takeaways Important For RRB NTPC/IBPS RRB Mains:

Australia Capital: Canberra, Currency: Australian Dollar.


Ranking and Reports


5. Mumbai in top 20 most expensive cities in Asia for expatriates
i. Mercer has released 25th Annual Cost of Living Survey.
Some findings of the survey:

The costliest city in the world for the second consecutive year is Hong Kong followed by Tokyo, Singapore and Seoul.


Mumbai fell 12 spots and was ranked at the 67th position out of 209 cities surveyed.


Eight out of the top ten of the world's most expensive cities for expatriates are Asian.


The world's least expensive cities for expatriates are Tunis (209), Tashkent (208), and Karachi (207).


Appointments


6. PB Acharya sworn in as Manipur Governor
i. Padmanabha Balakrishna Acharya sworn in as Governor of Manipur
ii. The Nagaland Governor Acharya will serve as Governor of Manipur as an additional charge during the absence, on leave, of Dr Najma Heptulla, Governor of Manipur.
Static/Current Takeaways Important For SBI PO/Clerk Mains:

Chief minister of Manipur: N. Biren Singh ; Capital of Manipur: Imphal.


Sports News


7. Marcus Trescothick to retire from professional cricket
i. Former England batsman Marcus Trescothick is to retire from professional cricket. 
ii. Trescothick, 43, played 76 Tests for England between 2000 and 2006 and scored 5,825 runs at an average of 43.79.
8. Virat Kohli becomes the fastest cricketer to score 20,000 international runs
i. Virat Kohli becomes the fastest cricketer to score 20,000 international runs. He took just 417 innings to reach the milestone and bettered the time taken by legends such as Sachin Tendulkar and Brian Lara.
ii. The India captain reached the milestone when he reached the score of 37 in India's 6th match in World Cup tournament against West Indies.

Obituaries 


9. Eminent Gandhian Jharna Dhara Chowdhury Passes Away
i. Jharna Dhara Chowdhury, an Eminent Social Activist and secretary of the Gandhi Ashram Trust in Jayag, Noakhali, Bangladesh passes away in Dhaka.
ii. She devoted her whole life to promoting peace, communal harmony and social justice. In recognition of her work, she was honored with Padma Shri in 2013. She was awarded Jamnalal Bajaj award in 1998.
Static/Current Takeaways Important For ESIC/EPFO Mains:

Bangladesh Capital: Dhaka, Currency: Taka, PM: Sheikh Hasina.


10. Former Bengal cricketer Shyam Sundar Mitra passes away
i. Former Bengal cricketer Shyam Sundar Mitra passes away . He was awarded the Karthick Bose Lifetime Achievement Award by Cricket Association of Bengal.
ii. Mitra, who captained Bengal in the Ranji Trophy, was an elegant right hand batsman and a part-time medium pacer.


Thursday, 27 June 2019

Programs to pyramid

Program to print half pyramid a using numbers
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Source Code

#include <stdio.h>
int main()
{
    int i, j, rows;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=1; i<=rows; ++i)
    {
        for(j=1; j<=i; ++j)
        {
            printf("%d ",j);
        }
        printf("\n");
    }
    return 0;
}
Example : Program to print half pyramid using alphabets
A
B B
C C C
D D D D
E E E E E

Source Code

#include <stdio.h>
int main()
{
    int i, j;
    char input, alphabet = 'A';
    printf("Enter the uppercase character you want to print in last row: ");
    scanf("%c",&input);
    for(i=1; i <= (input-'A'+1); ++i)
    {
        for(j=1;j<=i;++j)
        {
            printf("%c", alphabet);
        }
        ++alphabet;
        printf("\n");
    }
    return 0;
}

Example : Inverted half pyramid using *
* * * * *
* * * *
* * *
* *
*
Source Code

#include <stdio.h>
int main()
{
    int i, j, rows;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=rows; i>=1; --i)
    {
        for(j=1; j<=i; ++j)
        {
            printf("* ");
        }
        printf("\n");
    }
   
    return 0;
}

Example : Inverted half pyramid using numbers
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Source Code

#include <stdio.h>
int main()
{
    int i, j, rows;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=rows; i>=1; --i)
    {
        for(j=1; j<=i; ++j)
        {
            printf("%d ",j);
        }
        printf("\n");
    }
    return 0;
}

Example : Program to print full pyramid using *
        *
      * * *
    * * * * *
  * * * * * * *
* * * * * * * * *

Source Code

#include <stdio.h>
int main()
{
    int i, space, rows, k=0;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=1; i<=rows; ++i, k=0)
    {
        for(space=1; space<=rows-i; ++space)
        {
            printf("  ");
        }
        while(k != 2*i-1)
        {
            printf("* ");
            ++k;
        }
        printf("\n");
    }
   
    return 0;
}

Example : Program to print pyramid using numbers

        1
      2 3 2
    3 4 5 4 3
  4 5 6 7 6 5 4
5 6 7 8 9 8 7 6 5

Source Code

#include <stdio.h>
int main()
{
    int i, space, rows, k=0, count = 0, count1 = 0;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=1; i<=rows; ++i)
    {
        for(space=1; space <= rows-i; ++space)
        {
            printf("  ");
            ++count;
        }
        while(k != 2*i-1)
        {
            if (count <= rows-1)
            {
                printf("%d ", i+k);
                ++count;
            }
            else
            {
                ++count1;
                printf("%d ", (i+k-2*count1));
            }
            ++k;
        }
        count1 = count = k = 0;
        printf("\n");
    }
    return 0;
}

Example : Inverted full pyramid using *

* * * * * * * * *
  * * * * * * *
    * * * * *
      * * *
        *
Source Code

#include<stdio.h>
int main()
{
    int rows, i, j, space;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=rows; i>=1; --i)
    {
        for(space=0; space < rows-i; ++space)
            printf("  ");
        for(j=i; j <= 2*i-1; ++j)
            printf("* ");
        for(j=0; j < i-1; ++j)
            printf("* ");
        printf("\n");
    }
    return 0;
}
Example : Print Pascal's triangle

           1
         1   1
       1   2   1
     1   3   3    1
   1  4    6   4   1
 1  5   10   10  5   1

Source Code

#include <stdio.h>
int main()
{
    int rows, coef = 1, space, i, j;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=0; i<rows; i++)
    {
        for(space=1; space <= rows-i; space++)
            printf("  ");
        for(j=0; j <= i; j++)
        {
            if (j==0 || i==0)
                coef = 1;
            else
                coef = coef*(i-j+1)/j;
            printf("%4d", coef);
        }
        printf("\n");
    }
    return 0;
}

Print Floyd's Triangle.
1
2 3
4 5 6
7 8 9 10
Source Code

#include <stdio.h>
int main()
{
    int rows, i, j, number= 1;
    printf("Enter number of rows: ");
    scanf("%d",&rows);
    for(i=1; i <= rows; i++)
    {
        for(j=1; j <= i; ++j)
        {
            printf("%d ", number);
            ++number;
        }
        printf("\n");
    }
    return 0;
}