JoBat update

A Virtual World of Infotainment :)

Adam Number or Not

A number is said to be an Adam number if the reverse of the square of the number is equal to the square of the reversed number.for example 12 is a adam number because the reverse of the square of 12 is 144 which is 441 and square of the reverse of 12 is the square of the 21 which is also 441

Sample input : 12
Sample output : adam number
Sample input : 14
Sample output : not an adam number
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
    string num,rev;
    int sq_1,sq_2;
    cout<<"Enter the number ";
    cin>>num; //num=12
    rev=num;
    reverse(rev.begin(),rev.end()); //rev=21
    sq_1=stoi(num)*stoi(num); //stoi-string to integer //12*12=144
    sq_2=stoi(rev)*stoi(rev);//21*21=441
    num=to_string(sq_1); //convert number to string 
    rev=to_string(sq_2);
    reverse(rev.begin(),rev.end());//441-reversed to 144
    if(num==rev) //144==144
    {
        cout<<"Given number is an adam number";
    }
    else
    {
        cout<<"Given number is not an adam number";
    }
}

OUTPUT :

Compress a string

Write a program to compress the given string 

Sample input : aabbbccccddddd
Sample output : a2b3c4d5

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
    string a;
    int k=0,count=1,i=0,j,n;
    cout<<"Enter the string : ";
    cin>>a;
    n=a.size();
    cout<<"Compressed String : ";
    while(i<n)
    {
        
        for(j=k;j<n;j++)
        {
            if(a[j]==a[j+1])
            {
                count++;
                k=j+1;
            }
            else
            {
                k=j+1;
                break;
            }
        }
        i=k;
        cout<<a[i-1]<<count;
        count=1;
    }

    
}

OUTPUT:


N th minimum element in a array

To find the 'N' th minimum element in the given array

Sample input : array length : 5
                         array element : 10 5 3 8 15
                         nth element : 4
 Sample output : 10

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
int main()
{
    int arr[10],i,j,n,temp,a,min;
    printf("enter the length of array : ");
    scanf("%d",&a);
    printf("enter the array elements : ");
    for(i=0;i<a;i++)
    {
        scanf("%d",&arr[i]);
    }
    printf("Enter the 'n'th min value to find : ");
    scanf("%d",&n);
   for(i=1;i<a;i++) //insertion sort
   {
       temp=arr[i];
       j=i-1;
       while (j>=0 && arr[j]>temp)
       {
           arr[j+1] = arr[j];
           j = j-1;
       }
       arr[j+1] = temp;
   }
    printf("the minimum element in the given pos in array is : %d",arr[n-1]);
    return 0;
}

OUTPUT:


WhatsApp now allows you to re-download accidentally deleted photos and videos on Android




  • A new minor WhatsApp feature has been silently added to updates between 2.18.106 and 2.18.110. What this feature does is that it allows the WhatsApp user to download old media files in a chat even if they delete it from their local storage.
  • WhatsApp will be saving these media files in their servers for a much longer time. Earlier, the company would let the recipient of the media file to download it within a period of 30 days, after which it was deleted from the company's server and hence couldn't be recovered unless the sender releases it again.
  • This means that if you removed any images, GIFs, videos, audio files, audio recordings or even a document from the internal storage of your smartphone, WhatsApp will allow you to re-download them again from its servers.
  • The new update will let the user download the image or video even after it has been downloaded earlier. According to the report, the recipient was able to download media from a text sent 2 months ago but there for the messages dating back to almost a year, the application asks to request the sender to send the file again.
  • There will be no changes when it comes to end-to-end encryption of the media messages. This feature is not available for iOS users because it is unlikely that users will delete anything from the internal file directory without access.
  • They also released a fix for the issue with the beta users. The update 2.18.109 brings a fix to a 'day' bug. For instance, Yesterday became "89ESTERDAY" and Today became "84ODAY". The company has released a fix for the beta users.
The list of 65th National Award winners have been unfurled...

Village Rockstars grabbed the attention of many and late actress Sridevi got the Best Actress award!
Take Off, Baahubali 2, Bhayanakam, Irada, Walking with the Wind and Nagar Kirtan were the other notable names on the list.

Every field has multiple winners for various movies, but Music, an exception!

Both 'Best Music Direction' and 'Best Background Score' goes to 'Mozart of Madras' AR Rahman!!!
Best Music Direction for Mani Ratnam's Kaatru Veliyidai and Best Background Score for MOM!

When you take Kaatru Veliyidai and MOM, they failed to collect a huge out of Box office, yet they are musically rich!

Addictive Azhagiye,
Magical Vaan, 
Trippy Jugni,
Festive Saarattu,
SpanishTango,
And, Pleasing Nallai,
Made Kaatru Veliyidai, a breezy album!  


The Background score was handled by AR Rahman's talented Qutb-e-Kripa crew!
Here are some scenes, where the Background Score reached its zenith.,
  • Kargil War (Opening scene)
  • Snow Storm
  • At jail (remembering the past)
  • Van Chase after escape from jail
  • Traveling to nowhere (in search of love) and much more...
There was an Islamic touch throughout the sequences at Pakistan.
Certainly, the album topped the iTunes chart of Indian subcontinent!
AR Rahman got Shashaa Tirupati her first National Award for Best Female Playback Singer, for her beautiful rendition in 'Vaan Varuvaan'!
Only AR Rahman can pick up the best and bring out their best! (The best examples are Unnikrishnan, Shankar Mahadevan, Udit Narayan, Naresh Iyer, Shreya Ghoshal, etc.)

Coming to MOM,
  • 'Raakh Baaki' kickstarted (initial tune with "hey" chorus) in the opening scene at school, a perfect start to the film!
  • 'Freaking Life' was really freaky like it's name with a Party scene on the go.
  • The very next scene, where some strangers physically abuse Sridevi's daughter had a slow and horrific tune played at the background, that was quiet scary!
  • The scene, when Sridevi chases one of the rapists, started with a racy BGM and suddenly drops down, when Sridevi crashes with another vehicle. What a changeover!
  • When Sridevi goes to the homes of rapists secretly to plot their deaths, the music played at the backdrop of these scenes makes us feel nervous and sometimes jerks us off! 
  • It gives us a feel that, as if we are there at that place! 
  • An another scene, where Sridevi's daughter feels a sigh of relief (but unable to express her joy) after seeing the news of the death of one of the rapists (who spoiled her), the background score in this particular scene melted our hearts!
  • 'O Sona Tere Liye', sung by ARR was soulful, and a best fitting track to that particular situation, when Sridevi's family goes on a trip to overcome the disasters, the hard times of their lives! The song stirs the heart and brings a peace of mind!
  • The Climax scene, where the antagonist comes in search of Sridevi and her family to kill them had a different kind of horror tune, especially when Sridevi struggle to breathe (after her face was covered by the villain).


AR Rahman's experimental background score for MOM is well-deserved for the National Award!

The wait begins for the next Oscars for Beyond the Clouds...
Already, the album has become the #1 bestseller in Amazon!


#ARR #Ala_re_Ala #IsaiPuyal #EllaPugazhumIraivanukke 

Square Matrix-Corner Elements Sum

A square matrix of size N*N is passed as the input.The program must calculate and print the sum of the elements in the corners.
Sample Input:
Enter the order N of matrix : 3
Enter the matrix elements :
10 9 1
4 5 4
32 8 66
Sample Output:
109
Explanation:
sum = 10+1+32+66=109
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<stdio.h>
int main()
{
    int sum=0,a[10][10],i,j,n;
    printf("Enter the order N of matrix : ");
    scanf("%d",&n); //n*n matrix
    printf("Enter the matrix elements : ");
    for(i=0;i<n;i++)
    {
        for(j=0;j<n;j++)
        {
            scanf("%d",&a[i][j]);
        }
    }
    for(i=0;i<n;i++)
    {
        if((i==0)||(i==n-1)) //select only first and last row
        {
            for(j=0;j<n;j++)
            {
                if((j==0)||(j==n-1)) //select only first and last column 
                {
                    sum=sum+a[i][j];
                }
            }
        }
    }
    printf("%d",sum);
    return 0;
    
}

OUTPUT:


Palindrome Missing Alphabet 

String S which is a palindrome is passed as the input. But just one alphabet is missing in S.The program must print the missing alphabet A.
Note: The first alphabet of S will always be present.
Sample Input 1:
malayaam
Sample Output 1:
malayalam
missing character : l

Sample Input 2 :
abcddcb
Sample Output 2:
abcddcba
missing character : a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
 char str[20],temp[20],cha;
 int count=0,i,j,len;
 clrscr();
 printf("enter the string : ");
 gets(str);
 strcpy(temp,str);
 strrev(temp);
 len=strlen(str);
 for(i=0;i<=len;i++)
 {
  if(str[i]==temp[i])    //if same elt is present in both the array
  {
  printf("%c",temp[i]);
  }
  else if(count>0)    //after insert the missing character 
  {              //print remaining character without going to else loop
  printf("%c",temp[i]);
  }
  else          //insert missing character
  {
   for(j=len-1;j>=i;j--)
   {
   temp[j+1]=temp[j];//before insert shift the character one pos right
   }
   temp[i]=str[i];      //insert character
   cha=temp[i];
   printf("%c",temp[i]);
   count=count+1;
  }
 }
 printf("\nmissing character : %c",cha);
 getch();
 return 0;
}

OUTPUT




Minimum Absolute Difference in an Array

Given an array of integers,find and print the minimum absolute difference between any two elements in the array. for example given the array A=[-2,2,4] we can create 3 pairs of numbers [-2,2],[-2,4] and [2,4].The difference for these pairs are 4,6 and 2 .The minimum absolute difference is 2.

Sample input :
3 //number of elements in array
3 -7 0
Sample output:
3
Explanation:
|3 - -7| = 10
|3-0| = 3
|-7-0|=7
minimum difference is 3.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>
int main()
{
    int a[10],i,j,diff,n,k; //number of elements in array
    int arr[10],count=0,m,min; //array contains all possible diff in an array
    printf("Enter the number of elements : ");
    scanf("%d",&n);
    printf("enter the array elements :");
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<n-1;i++)
    {
        k=i+1;
        for(j=k;j<n;j++)
        {
            diff=a[i]-a[j];
            arr[count]=abs(diff); //difference stored in second array
            count++;
        }
    }
    //find the smallest number in the second array 
    min=arr[0];
    for(m=1;m<count;m++)
    {
        if(arr[m]<min)
        {
            min=arr[m];
        }
    }
    printf("minimum absolute difference = %d",min);
    return 0;
}
OUTPUT:



Reverse vowels in a given string

         Given a string,task is to reverse the vowels of the string.
Sample Input 1:
jobat update
Sample Output 1:
jebat updato
Sample Input 2:
hello world
Sample Output 2:
hollo werld

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include<stdio.h>
#include<string.h>
int main()
{
    char a[20],b[20],t[20];
    int j=0,l,k,i;
    printf("Enter the string  ");
    gets(a);
    l=strlen(a);
    for(i=0;i<l;i++)
    {
        if((a[i]=='a')||(a[i]=='i')||(a[i]=='o')||(a[i]=='u')||(a[i]=='e'))
        {
            b[j]=a[i]; //vowels stored in another array
            j++;
        }
    }
    k=strlen(b);
    j=0;
    for(i=l-1;i>=0;i--)
    {
        if((a[i]=='a')||(a[i]=='i')||(a[i]=='o')||(a[i]=='u')||(a[i]=='e'))
        {
            a[i]=b[j];
            j++;
        }
    }
    printf("%s",a);
}

OUTPUT







  • Reliance Jio has introduced a cricket season prepaid pack that will allow cricket lovers to get access to live matches of IPL (Indian Premier League) on mobile and stream almost every live match throughout the duration of 51 days starting April 7
  • You can watch almost every LIVE match throughout the duration of 51 days of the Indian Premier League (IPL) matches
  • It is available at Rs. 251 only and offers data of 102 GB or gigabytes.
  • To watch: First download MyJio App and press play.
  • Also, Jio Dhan Dhana Dhan LIVE:Cricket comedy Show from April 7 every Friday, Saturday and Sundays @7.30pm. It will also feature popular comedians and anchors like Shilpa Shinde, Ali Asgar, Sugandha Mishra, Suresh Menon, Paresh Ganatra, Shibani Dandekar and Archana Vijay. Cricketers including Kapil Dev and Virendra Sehwag will also join the show.
  • Jio Cricket Play Along: Jeeto Dhan Dhana Dhan: A mobile game.The game will enable the users to win prizes such as a premium house in Mumbai. 25 persons will get to win as many cars. There are cash prizes worth crores and much more.
IPL with Jio fever begins!!!



Newer Posts Older Posts Home

SUBSCRIBE & FOLLOW

POPULAR POSTS

  • Middlewares in Express JS
  • Windows 10 May 2020 Update How to Download it and its features
  • Mersal Movie Review
  • Square Matrix-Corner Elements Sum
  • Tyrese Gibson Threatens To Quit FF Franchise..!
  • Sketch Movie Review
  • Palindrome Missing Alphabet
  • Thaana Serndha Kootam (aka) TSK Movie Review
  • JBM awards 2k18
  • Suriya 37 Confirmed!

Categories

  • Awards 4
  • Code 23
  • Review 19
  • sport 1
  • Tech 20
  • Update 19

Contact Form

Name

Email *

Message *

  • ►  2020 (3)
    • ►  July (1)
    • ►  May (2)
  • ►  2019 (8)
    • ►  October (1)
    • ►  July (1)
    • ►  June (1)
    • ►  February (1)
    • ►  January (4)
  • ▼  2018 (52)
    • ►  October (3)
    • ►  September (3)
    • ►  August (2)
    • ►  July (3)
    • ►  June (5)
    • ►  May (1)
    • ▼  April (10)
      • Adam Number
      • Compress a string
      • Nth minimum element in a array
      • WhatsApp's New Re-download Feature!!!
      • And the National Award goes to...
      • Square Matrix-Corner Elements Sum
      • Palindrome Missing Alphabet
      • Minimum Absolute Difference in an Array
      • Reverse Vowels
      • Jio Cricket Pack with 102GB data!!
    • ►  March (19)
    • ►  February (1)
    • ►  January (5)
  • ►  2017 (19)
    • ►  December (3)
    • ►  November (8)
    • ►  October (8)

Search This Blog

Powered by Blogger.

Report Abuse

HOME

  • HOME
  • Code Block
  • Tech World
  • How is it?
  • What's Up?
  • JoBatMovie_Awards
  • Sports Block
  • Privacy Policy

JoBatMovie Awards

  • Home
  • JoBatMovie Awards
  • Home

Featured post

JBM awards 2k18

JoBat Updates

Designed by OddThemes | Distributed by Gooyaabi Templates