Friday, 1 December 2017

Code Challenge Solutions 5

1.  The FizzBizz Problem


Write a program to print numbers upto n.
With a catch that, if the number is a multiple of 3 print FIZZ
print BIZZ if multiple of 5
and FIZZBIZZ if it is both multiple of 3 and 5.


Program:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,i,j,k;
    int arr[100];
scanf("%d",&n);
    for(i=0;i<n;i++)
{
arr[i]=i;
}

for(i=1;i<n;i++)
        {
            if((arr[i]%5==0) && (arr[i]%3==0))
            printf("FizzBizz\n");
            else if(arr[i]%5==0)
            printf("Bizz\n");
            else if(arr[i]%3==0)
            printf("Fizz\n");
            else
            printf("%d\n",arr[i]);
        }

    if((n%5==0) && (n%3==0))
            printf("FizzBizz\n");
            else if(n%5==0)
            printf("Bizz\n");
            else if(n%3==0)
            printf("Fizz\n");
            else
            printf("%d\n",n);
    return 0;

}



2. Given two strings,

That may or may not be of the same length, determine the minimum number of character deletions required to make  and  anagrams. Any characters can be deleted from either of the strings.


Program:



#include<bits/stdc++.h>

using namespace std;

int main() {
    string str1,str2;
    getline(cin,str1);
    getline(cin,str2);

    int A[26],B[26],i;
    for(i=0 ; i< 26 ; i++)
        A[i] = B[i] = 0;
    for(i = 0 ; i< str1.length() ; i++)
        A[(int)(str1[i] - 'a')]++;
    for(i = 0 ; i< str2.length() ; i++)
        B[(int)(str2[i] - 'a')]++;
    int outp = 0;
    for(i=0 ; i< 26 ; i++)
    {
        outp = outp + A[i] + B[i] - 2*min(A[i],B[i]);
    }
    cout<<outp<<endl;
    return 0;

}


Monday, 13 November 2017

Mahabalipuram - A seventh century Marvel

Situated along the coast of Bay of Bengal, Mahabalipuram Temple is really a marvel.

Ratha Temples (Temples in  the shape of Chariots)


Make Money with Elance (now upwork.com)


Elance.Com, (now UpWork.com) the world's leading platform for online jobs (please contact online support before registering on this website). You can sign up for free on this site. Click on Sign In button at the top right corner of the website.

Next, you have to select if you want to hire people or need work. Just check “I want to Work” and click on Continue button.


Next, you have to select a membership plan. We just need a free basic account, click on the Select button of basic profile.

Fill out the registration form. Check the declaration box and click on Register.


Select type of jobs next, data entry jobs can be found in the Admin Support section.


To complete the registration process they will ask you to verify your E-mail address.


Log in to your mailbox, open the mail received from Elance, and click the blue box “Click to verify your email address”


You will be redirected to a new Elance window and they will prompt you to Start your profile. Click on that button to get started.


You will have to provide a few more details. Click on next to continue.


Next page is Hourly rates and skills. You can upload an image as your profile picture and give tagline and overview.


Confirm your commitment by clicking “Yes, I Take the Pledge” button on the next page.


You will be redirected to your profile. Before proposing for jobs, you should verify your phone number. Click on the link “Verify your contact phone number”


You will receive a call soon from Elance. They will ask you to press # and speak the code displayed on your monitor. You can now apply for jobs by clicking “Find work” from the menu displayed on top.




Make Money Online

Scam free ways to make money online
Sell stock photos
iStockPhoto is just one site that allows you to sell stock photos; there are others. Before you decide to upload your whole album, take note of what’s selling well and try doing something similar. iStockPhoto also works for those who know how to render images; some of their most popular images were created on a computer! Have three stock photos ready for iStockPhoto’s inspection; they will want them when you sign up.
Sell stuff on eBay
Start by selling your own extra stuff. Then, once you get a feel for selling your extra stuff, go door-to-door in nicer neighborhoods in your town. Develop an eye for what will sell and what won’t (old laptops, for instance, could be a gold mine–if you know how to format them to remove previous owner’s personal data.) Sign a contract where you take 25-30% (or more) of the sale. Your customers will be happy to get cash for their old stuff, and you’ll make some good money selling other people’s stuff on eBay.
Become a freelance article writer
It may not pay well, but there is a growing demand for this. Write 200-300 word articles and submit them to article directories. Potential clients include bloggers, marketers, and small businesses. You can write articles in a niche in batches and sell them as a package to one or more clients, or you can offer your services for hire per word or article and let your client give you direction. A foundation of keyword research is important to succeed at this job (unless you’re just taking direction from a client), but keyword research is learnable.
Write articles for magazines or other publications
If you have a background in journalism, or just a passion for it, you can try submitting articles to publications. Don’t just randomly fire off articles, however; have a plan and, preferably, a contact at the publication you wish to submit to. The good news is that there are publications in pretty much any niche you can think of. To see some publications that are hiring, visit Online Writing Jobs, PoeWar Freelance Jobs, and Writing.com.
Transcribe audio files
An easy job; doesn’t pay well, but also a quick way to make some money. Sign up on eLance or oDesk to start, and/or advertise your services in entrepreneur forums. Requires good hearing and a good command of the English language. You may also want to invest in a foot pedal if you plan to transcribe often. Make sure you know how to transcribe interviews before you start your first job.
Write articles on eHow.com
If you understand the basics of keyword research, you can make a good monthly income from eHoweHow pays you a percentage of the ad revenue they make from each “How to” article you create. You can crank out a few articles a day with relative ease. Try this for a month; assuming your article titles match up with what people are searching for in Google, you can make a significant income. The great news is that you write your articles once and get paid month after month. Make money writing for eHow.com.
Write an ebook targeted to people who need help.
The key? Finding people who are in need for the information you provide and then doing good research to find a real solution to their problems. The result? Happy customers whose problem is solved, and money for you. Here are some hints: When were you last in a situation where information would have either saved you a lot of money or a lot of pain? Has someone else close to you been in a situation where they could have used information to avert pain? Think legal, medical, and financial niches.

Work From Home