Zensar Technologies  Assessment  question Coding 1 & 2

Zensar Technologies Assessment question Coding 1 & 2

Zensar Coding questions

First

Given an email address extract username U by eliminating the "@" and subsequent character to form a new string and add length of U at the end of the string to be formed . Read Sample input output for better understanding.

Input1:

gourav.mk@gmail.com

Output1:

gourav.mk9

Input2:

hellofrankyji@gmail.com

Output:

hellofrankyji13

Solution:

Paste the sample input in STDIN to check the code
To Tinker the code click here


Second

Given two integer A and B, write a program to print binary equivalent N of the GCD(greatest common divisor) of A and V and also print the number of 1s in N. Read the Sample input output to understand better.

Input1:

20 100

Output1:

10100
2

Explanation 1:

will be updated soon

Solution:

Paste the sample input in STDIN to check the code
To Tinker the code click here