Blogger templates

Pages

Friday, 3 August 2012

WAP to determine whether the Number is Prime or Not by using while and if Statement

C break Statement
Break Statement:
There are many situations where we want to jump out of a loop instantly. The keyword break allows us to do this. When break is encountered inside any loop, control automatically passes to the first statement after the loop. So Let us understand the break statement with the help of Program :-

Statement of C Program: This Program accepts a number and determined whether the number is Prime or not.

Prime Number:
A Prime number is one, which is divisible by 1 or itself.  Ex: 3 , 5 , 7 , 11 , 13 , 17 , 23 , 19 etc.

#include<stdio.h>
#include<conio.h>
void main()
{
int a , b ;
clrscr();

printf(" Enter the value of a\n");
scanf("%d" , &a);

b = 2;
while( b <= a-1 )
{
if(a % b == 0)
{
printf(" Entered Number is not Prime\n");
break;
}
b = b + 1;                                                   /*   b++     or    b += 1   */
}
if(b = a)
{
printf(" Prime Number\n");
}
getch();
}

Output1:
Enter the value of a
7
Prime Number

Output2:
Enter the value of a
9
Entered Number is not Prime

Explanation:
  • In the above Program, if the condition { i.e a % b } turns out to be zero, then the message " Entered number is not Prime " is printed and after that the break statement encountered which causes control out of while loop.
  • If the condition { i.e b == a } is true, then the message " Prime Number " is printed.
                                                                      
                                                                    That's All

Internet Download Manager 6.12 Beta Build 8 Full Patch

Internet Download Manager - Tonec memang sangat rajin dalam memanjakan pelanggannya. Ini dibuktikan dengan selalu memberikan update software downloader yang telah mendunia ini, bahkan dalam waktu yang sangat singkat. Belum ada satu minggu update, eh sekarang sudah update lagi. Tapi gak papa, justru ini yang selalu dinantikan. Siapa sih yang gak suka kalau softwarenya selalu up to date. Jadi, apakah anda suka download dari internet..? Untuk membantu anda dalam urusan mendownload supaya lebih stabil maka saya hadirkan ini untuk anda yang membutuhkan..!


Screen Shoot:

Download link:
Password :  | Status : Tested (Windows 7 32-bit)

What's new:
  • Fixed bugs
Jika ada masalah laporkan di:
  • Facebook: Ervan
  • Atau tinggalkan komentar di bawah

Metal Texture - Free Vector CorelDRAW


Thursday, 2 August 2012

Angry Birds Space 1.2.2 Full Serial

Angry Bird Space - apakah ada sobat BAGAS31 yang tidak kenal game yang satu ini ? Saya rasa enggak mungkin kalau sampai belum tahu. Ya, Angry Bird Space adalah salah satu versi dari Angry Bird. Untuk yang versi ini suasana game berada di angkasa luar sehingga menjadikan permainan semakin menarik, selain itu di sini kita juga akan di hadapkan dengan gaya gravitasi planet-planet yang dapat memudahkan kita atau kadang juga menyusahkan kita dalam bermain. Di versi terbarunya ini menambahkan karakter burung dan beberapa hal yang baru lagi. Untuk itu silahkan di download jika ingin tahu lebih jelasnya...!

Screen Shoot:

Download link:
Jika ada masalah laporkan di:
  • Facebook: Ervan
  • Atau tinggalkan komentar di bawah
Semoga bermanfaat...

Wednesday, 1 August 2012

WAP of C Language that calls many Functions

C Function Program

Statement of C Program : This Program prints the Messages or Instructions when different Functions calls: 

#include<stdio.h>

void England();                                      /* Function declaration */
void Australia();                                     /* Function declaration */
void India();                                           /* Function declaration */

int main()
{
printf(" I am in main\n");

England();                                                 /*  Function call */
Australia();                                                /*  Function call */
India();                                                      /* Function call */

return(0);
}

void England()                                             /* Function definition */
{
printf(" I am in England\n");
}

void Australia()                                             /* Function definition */
{
prinf(" I am in Australia\n");
}

void India()                                                   /* Function definition */
{
printf(" I am in India\n");
}

Output:
I am in main
I am in England
I am in Australia
I am in India

Note:  Number of Conclusions drawn from the above Program:
  • A C Program is a collection of one or more Function or you can say A Function is a basic building block of C program.
  • If a C program contain only one Function, then it must be main(), because Program execution always begins with main().
  • In C program, as many number of Functions exist i.e there is no limit on the number of Functions.
  • Control returns to main() after each Function has doing its work or thing.
  • The Program ends, when main() runs out of statements and Function calls.

                                                               

                                                                 That's All

No Smoking - Free Vector CorelDRAW



Sailing - Free Vector CorelDRAW