Page Rank Checker

Web Tourer

This Web Browser Is Completely Design And Coded By Me. Click Here For More Information Or Download.

Hardware

Click here to learn complete Computer Hardware without paying any cost. Articles are provided free of cost by WOLWEB.

Get Free Attractive Templates For Your Blog or Website

This Website Provide Free Attractive Templates For Download. For Download Just Click Here.

Let Us C Solution

This Is A Solution For Let Us C Book Written By Yashwant Kanetkar Learning Basic C Programming.

Page Rank Checker

Page Rank checker is a free tool to check Google™ page ranking of any web site pages easily and to display your site's PageRank™ value on your web pages

Alexa

Alexa is the leading provider of free, global web metrics. Search Alexa to discover the most successful sites on the web by keyword, category, or country.

Saturday, 5 July 2014

Calculate Amount In Compound Interest Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. When interest compounds q times per year at an annual rate of r% for n years, the principal p compounds to an amount a as per the following formula   
       a = p(1 + r/q)nq
      Write a program to read 10 seats of p, r, n & q and calculate the corresponding a.

Ans.

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
    clrscr();
    float p, r, n, q, a;
    int i;
    for(i=1;i<=10;i++)
    {
        printf("\nenter values of p, r, n, q ");
        scanf("%f%f%f%f",&p,&r,&n,&q);
        a=p*pow((1+(r/q)),n*q);
        printf("\nValue of a is %f\n",a);
    }
    getch();
}

Minimum Life For Attractive Investment Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. A machine is purchased which will produce earning of Rs. 1000 per year while it lasts. The machine costs Rs. 6000 and  will have a salvage value of Rs.2000 when it is condemned. If 12 percent per annum can be earned on alternate investments What will be the minimum life of the machine to make it more attractive investment compared to alternate investment?

Ans.

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int mchn_invst, altrnt_invst, yr=0;
    while(altrnt_invst>mchn_invst)
    {
        altrnt_invst=120*yr;
        mchn_invst=1000*yr-(6000-2000);
        yr++;
    }
    printf("Minimum life of machine to make it attractive is %d",yr);
    getch();
}

Produce Given Pattern With Numbers Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. Write a program to produce the following output:
                              1
                        1          1
                   1         2          1
              1         3         3         1
          1       4         6         4         1

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int lines, n=1, spaces, tabs=8, x, y=1;
    for(lines=1;lines<=5;lines++)
    {
        for(spaces=1;spaces<=tabs;spaces++)
            printf(" ");
        printf("%4d",n);
        if(lines>=3)
        {
            for(x=1;x<=y;x++)
            {
                if(x==2&&y==3)
                    printf("%4d",lines+1);
                else
                    printf("%4d",lines-1);
            }
                y++;
        }
            if(lines>=2)
                printf("%4d",n);
            tabs=tabs-2;
            printf("\n");
    }
    getch();
}

Produce Given Pattern With 1-10 Numbers Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. Write a program to produce the following output:
                         1
                   2          3
               4        5         6
          7       8         9          10

Ans.

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int n, i=1, no_tab;
    for(n=1;n<=10;n++)
    {
        if(n==1||n==2||n==4||n==7)
        {
            printf("\n\n");
            if(n==1)
            printf("\t\t\t");
            if(n==2)
            printf("\t\t");
            if(n==4)
            printf("\t");
        }
        printf("\t\t%d",n);
    }
    getch();
}

Print Multiplication Table Of Number Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. Write a program to print the multiplication table of the number entered by the user. The table should get displayed in the following form:
      29 * 1 = 29
      29 * 2 = 58
      ......

Ans.

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int n, i, ans;
    printf("Enter any number ");
    scanf("%d",&n);
    for(i=1;i<=10;i++)
    {
        ans=n*i;
        printf("\n%2d * %2d  = %3d",n,i,ans);
    }
    getch();
}

Produce Given Pattern With A, B, C, D, E, F, G Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. Write a program to produce the following output:
       A B C D E F G F E D C B A
       A B C D E F     F E D C B A
       A B C D E            E D C B A
       A B C D                  D C B A
       A B C                          C B A
       A B                                 B A
       A                                        A

Ans.

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    int i, j, l;
    for(j=0,l=72;j<=6;j++,l--)
    {
        for(i=65;i<=71;i++)
        {
            if(i<l)
            printf("%c ",i);
            else
            printf("  ");
            if(i==71)
            {
                i--;
                for(;i>=65;i--)
                {
                    if(i<l)
                    printf("%c ",i);
                    else
                    printf("  ");
                }
                break;
            }
        }
        printf("\n");
    }
    getch();
}

Calculate Approximate Intelligence Program In C


This article is from solution of Let Us C by Yashwant Kanetkar. I also posted many another articles regarding solutions of Let Us C. If you have any problem regarding solution then give comment, I will surely reply your question.

Q. According to a study, the approximate level of intelligence of a person can be calculated using the following formula:
     i = 2 + (y + 0.5x)
     Write a program that will produce a table of values of i, y and x, where y varies from 1 to 6, and, for each value of y, x varies from 5.5 to 12.5 in steps 0.5.

Ans.

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();
    float i, y, x;
    printf("Values Of\n");
    printf("i \ty \tx");
    for(y=1;y<=6;y++)
    {
        for(x=5.5;x<=12.5;x=x+0.5)
        {
            i=2+(y + (0.5*x));
            printf("%10f \t%10f \t%10f\n",i,y,x);
        }
    }
    getch();
}