Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Monday, April 26, 2010

WAP to count lenght of string


/*WAP to count lenght of string*/

#include <stdio.h>
#include <string.h>
#include<conio.h>
void main()
{
   char *string = "computer";
   clrscr();
   printf("%d\n", strlen(string));
   getch();
}

Saturday, April 24, 2010

Demonstrate the for loop


/*Demonstrate the for loop.*/
/*Save file as: ForTest.java*/

class ForTest
{
 public static void main(String args[]) 
  {
   int x;
   for(x = 0; x<10; x = x+1)
   System.out.println("This is x: " + x);
  }
}

WAP to convert Fahrenheit temperature into degree Celsius


/* WAP to convert Fahrenheit temperature into degree Celsius */

#include<stdio.h>
#include<conio.h>
void main()
{
int fahr, celsius;
clrscr();
printf("enter fahrenhiet tempreture");
scanf("%d",&fahr);
celsius = 5 * (fahr-32) / 9;
printf("%d",celsius);
getch();
}

Thursday, April 22, 2010

WAP to print even and odd number b/w 1 to 100


/*WAP to print even and odd number b/w 1 to 100*/
/*Save File as : eh.java*/

import java.lang.*;

class evenodd
{
 int i,flag;
void calculate()
   {
    for(i=1;i<=10;i++)
      
       if(i%2==0)
        {
         System.out.println("No. is Even " + i);
        
        }
       else
       if(i%2!=0)
        System.out.println("No. is ODD " + i);
   }
}
class eh
{
 public static void main(String arg[])
   {
    evenodd e1=new evenodd();
    e1.calculate();
   }
}

convert seconds into hours,minutes & remaning seconds


/*convert seconds into hours,minutes & remaning seconds */

#include<stdio.h>
#include<conio.h>
void main()
{
int a,hours,minutes,rh,rm,sec;
clrscr();
printf("enter seconds\n");
scanf("%d",&a);
hours=a/3600;
rh=a%3600;
minutes=rh/60;
rm=rh%60;
sec=rm;
printf("hours=%d",hours);
printf("\nminutes=%d",minutes);
printf("\nsec=%d",sec);

getch();
}

Tuesday, April 20, 2010

To display table of given number


/*To display table of given number*/
/*Save as : Demo_table.java*/

import java.lang.* ;
class table
{
int num,t;
table(int a)
{
num=a;
}
void display()
{
System.out.println("Table of :"+num);
for(int i=1;i<=10;i++)
{
t=num*i;
System.out.println(+t);
}
}
}
class Demo_table
{
public static void main(String arg[])
{
table t1=new table(5);
t1.display();
}
}

convert day into year,month,week & days


/*convert day into year,month,week & days*/

#include<stdio.h>
#include<conio.h>
void main()
{
int a,year,month,ry,rm,week,rw,days;
clrscr();
printf("enter day\n");
scanf("%d",&a);
year=a/365;
ry=a%365;
month=ry/30;
rm=ry%30;
week=rm/7;
rw=rm%7;
days=rw;
printf("year=%d",year);
printf("\nmonth=%d",month);
printf("\nweek=%d",week);
printf("\ndays=%d",days);
getch();
}

Monday, April 19, 2010

WAP of Shape


'WAP of Shape

'controls       Property        Setting

'Shape1         Name            shpshape
'               Width           200
'               height          300

'Vertical       Name            SrcVertical
'Scrollbar      
'               Min             300
'               Max             200

'Horizontal     Name            SrcHorizontal
'Scrollbar      
'               Min             300
'               Max             200




'-----------------------------------------------------
'                        CODE

Private Sub SrcHorizontal_click()
shpshape.Width=SrcHorizontal.value
End Sub

Private Sub SrcVertical_click()
shpshape.height=SrcVertical.value
End Sub

WAP to print prime no. b/w 1 to 100


/*WAP to print prime no. b/w 1 to 100*/
/*Save as: demo_sprime.java*/

import java.lang.*;
class sprime
{
 int num,count=0;
 sprime(int a)
   {
    num=a;
   }
 void display()
    {
     for(int i=1;i<=num;i++)
       {
        for(int j=1;j<=i;j++)
          {
           if(i%j==0)
           count++;
           
          }
          if(count<3)
           {
            System.out.println(i);
            count=0;
           }
          else
            count=0;
       }
    }
}
class demo_sprime
{
 public static void main(String arg[])
   {
    sprime p1=new sprime(100);
    p1.display();
   }
}

WAP to check no is negetive or positive


/*WAP to check no is negetive or positive*/

#include<stdio.h>
#include<conio.h>

int no;
void negpos();
void main()
{
 clrscr();
 printf("Enter -ive or +ive number");
 scanf("%d",&no);
 negpos();
 getch();
}
void negpos()
   {
    if(no<0)
     printf("Entered no. is negative");
    else if(no>0)
     printf("Entered no. is positive");
    else
     printf("Wrong entry");

   }

Sunday, April 18, 2010

WAP of Password security


'WAP of Password security

'controls       Property        Setting

'Textbox1        Name            txt
'                Caption           -
                
'Label1          Name            lbl
 '               Caption          Enter Password

'command1        Name            cmdOk
'                Caption           OK

'command2        Name            cmdCancel
'                Caption           Cancel
          
'-----------------------------------------------------
'                        CODE

Private Sub cmdOk_click()
If txt.text="123" Then
msgbox("Welcome")
else
msgbox("Wrong Password - enter 123")
End IF
End Sub

Private Sub cmdCancel_click()
End
End Sub

Display div of array elements


/*Display div of array elements*/
/*Save File as: array_Div.java*/

import java.lang.*;
class Array
{
   int l[];
   int x[];
   int y[];
   Array()
   {
   l=new int[]{1,2,3,4,5};
   x=new int[]{2,3,4,5,6};
   y=new int[5];
   }
   void display()
   {
   System.out.println("The addition of array is ");
   for(int i=0;i<5;i++)
   {
   y[i]=l[i]/x[i];
   System.out.println(y[i]);
   }
   }
}

class array_Div
{
   public static void main(String arg[])
   {
   Array A = new Array();
   A.display();
   }
}

WAP to check leap year


/*WAP to check leap year*/

#include<stdio.h>
#include<conio.h>
void main()
{
 int a;
 clrscr();
 printf("enter year");
 scanf("%d",&a);
 if(a%4==0)
 printf("year is leap");
 else
 printf("year is'not leap");

 getch();
 }

WAP to check enter character is Alphabat,digits or any special char.


/*WAP to check enter character is Alphabat,digits or any special char.*/

#include<stdio.h>
#include<conio.h>
void main()
{
 char any;
 clrscr();
 printf("enter any character");
 scanf("%c", &any);
 if(any>=48&&any<=57)
 {
 printf("it is digit");
 }
 else
 if(any>=97&&any<=122)
 {
 printf("it is lowercase alphabat");
 }
 else
 if(any>=65&&any<=90)
 {
 printf("it is upper case alphabat");
 }
 else
 if(any>=32&&any<=47)
 {
 printf("it is special symbol");
 }
 else
 if(any>=58&&any<=64)
 {
 printf("it is special symbol");
 }
 else
 if(any>=91&&any<=96)
 {
 printf("it is special symbol");
 }
 else
 if(any>=123&&any<=127)
 {
 printf("it is special symbol");
 }
getch();
}

Thursday, April 15, 2010

WAP to calculat factorial using "for loop"


/*WAP to calculat factorial using "for loop" */

#include<stdio.h>
#include<conio.h>
void main()
{
int fact=1,n,i;
clrscr();
printf("enter number");
scanf("%d",&n);
for(i=1;i<=n;i++)
fact=fact*i;
{
printf("%d",fact);
getch();
}
}

WAP to calculat factorial using "WHILE" loop


/*WAP to calculat factorial using "WHILE" loop"*/

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=1,fact=1;
clrscr();
printf("enter no.");
scanf("%d",&n);
while(i<=n)
{
fact=fact*i;
i++;
}
printf("%d",fact);
getch();
}

WAP To print Subtraction of array elements


/*WAP To print Subtraction of array elements*/
/*Save file as: Array_Subtraction.java*/

import java.lang.*;
class Array
{
        int l[],m[],n[];
        Array()
        {
        l=new int[] {1,2,3,4,5,6,7,8,9};
 m=new int[] {1,2,3,4,5,6,7,8,9};
 n=new int[9];
        }
        void display()
        {
        for(int i=0;i<9;i++)
        {
  n[i]=l[i]-m[i];
  System.out.print("  "+n[i]);
               
        }
        }
}
class Array_Subtraction
{
        public static void main(String arg[])
        {
        Array a1=new Array();
        a1.display();
 }
}

WAP of Addition,Subtraction,Multiplycation


WAP of Addition,Subtraction,Multiplycation...

'controls       Property        Setting

'Textbox1        Name            Text1
 '               Caption           -

'Textbox2        Name            Text2
   '             Caption           -

'Label1          Name            Lebel1
  '              Caption          Enter first number

'Label2          Name            Lebel2
   '             Caption           enter second number

'Label3          Name            Lebel3
    '            Caption           Result

'command1        Name            command1
 '               Caption         Addition
          
'command2        Name            command2
 '               Caption         Subtraction
           
'command3        Name            command3
 '               Caption         Multiplication
           
'command4        Name            command4
'                Caption         Dividetion

'command5        Name            command5
'                Caption         Mod
'----------------------------------------------------------
'                      Code
Dim a as Integer
Dim b as Integer
Dim c as Integer

Private Sub command1_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a+b
Lebel3=c
End Sub

Private Sub command2_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a-b
Lebel3=c
End Sub

Private Sub command3_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a*b
Lebel3=c
End Sub

Private Sub command4_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=a/b
Lebel3=c
End Sub

Private Sub command5_click()
a=Val(Text1.text)
a=Val(Text2.text)
c=aModb
Lebel3=c
End Sub

Wednesday, April 14, 2010

WAP to addition of metrix


/*WAP to addition of metrix*/

#include<stdio.h>
#include<conio.h>
void main()
{
int a[2][2],b[2][2],c[2][2],row,col;
clrscr();
printf("enter 2 metrix");

for(row=0;row<2;row++)
{
for(col=0;col<2;col++)

scanf("\t%d%d",&a[row][col],&b[row][col]);
}

for(row=0;row<2;row++)
{
printf("\n");
for(col=0;col<2;col++)


c[row][col]=a[row][col]+b[row][col];
}
printf("%d",c[row][col]);
getch();
}

Sunday, April 11, 2010

WAP to enter five subject marks of student & calculat total marks,percentege,average,division


/*WAP to enter five subject marks of student & calculat total marks,percentege,average,division*/

#include<stdio.h>
#include<conio.h>
void main()
{
int os,sm,dm,ppl,dsa,total;
float per,avg;
clrscr();
printf("enter five subjects marks");
scanf("%d%d%d%d%d",&os,&sm,&dm,&ppl,&dsa);
total=os+sm+dm+ppl+dsa;
per=total*100/50;
avg=total/5;
printf("\ntotal=%d",total);
printf("\npercentege=%f\navrege=%f",per,avg);
if(per>=60)
{
printf("\ndiv=first div.");
}
else
if(per>=45 &&per<60)
{
printf("\ndiv=second div");
}
else
if(per>=33 &&per<45)
{
printf("\ndiv=third div");
}
else
{
printf("\ndiv=fail");
}
getch();
}

Thursday, April 8, 2010

WAP of STACK


/*WAP of STACK*/

#include<stdio.h>
#include<conio.h>
#include<alloc.h>
#include<process.h>
struct stack
{
  int no;
  struct stack *next;
}*top=NULL;
typedef struct stack st;
void push();
int pop();
void display();
void main()
{
    char ch = 'y';
    int choice,temp;
    clrscr();
    do
    {

      printf("\n1:push");
      printf("\n2:pop");
      printf("\n3:display");
      printf("\n4:exit");
      printf("\nEnter your choice");
      scanf("%d",&choice);
      switch(choice)
      {
        case 1:push();
             break;
        case 2:temp=pop();
        printf("the deleted element is%d",temp);
             break;
        case 3:
             display();
             break;
       case 4:
             exit(0);
             break;
        default:
             printf("\n wrong choice");
      }
      printf("do you want continue(y/n)");
      flushall();
      scanf("%c",&ch);
    }
    while(ch =='Y'|| ch =='y');
 }
 void push()
 {

    st*P;
    P=(st*)malloc(sizeof(st));
    printf("\nthe number");
    scanf("%d",&P->no);
    P->next=top;
    top=P;
 }
    int pop()
    {
       st*P;
       P=top;
       if(top==NULL)
       {
           printf("stack is already empty");
           getch();
           exit(0);
       }
       else
       {
           top=top->next;
           free(P);
       }
       return(P->no);
    }
    void display()
    {

       st*P;
       P=top;
       while(P->next != NULL)
       {
            printf("\n=%d",P->no);
            P=P->next;
       }
       printf("\nno=%d",P->no);
    }



How to earn online:


  1. Step - 1 :

    signup for PayPal, to recieve your online earning
    click here:
    https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL

  2. step - 2 :
    Read & Rate interesting articales to earn money!
    per artical $0.03 to $0.10
    link: http://www.readbud.com/?ref=4096068

  3. EARN MONEY BY BUMPING SITES, DAILY 5 ADS TO CLICK,
    PER CLICK 0.02$, DAILY 0.10$ EARN, MINIMUM PAYOUT 15$,
    YES ITS FREE TO JOIN
    http://www.MoneyBumper.com/Main.cfm?R=134526

Wednesday, April 7, 2010


/*WAP to enter record of 5 student name,class,roll no. & 5 subjects marks
& calculate Total, percentage,divition of each*/

#include<stdio.h>
#include<conio.h>
struct student
    {
     char name[25];
     int marks[5];
     int roll,clas;

    }
main()
{
student s1,s2,s3,s4,s5;
int i;
int total=0,per;
clrscr();
printf("\nEnter first student name\n");
gets(s1.name);
printf("\nenter class");
scanf("%d",&s1.clas);
printf("\nenter roll no.");
scanf("%d",&s1.roll);
printf("\nEnter 5 sub. marks");
for(i=0;i<5;i++)
  {
   scanf("%d",&s1.marks[i]);
  }

printf("\nEnter second student name\n");
gets(s2.name);
printf("\nenter class");
scanf("%d",&s2.clas);
printf("\nenter roll no.");
scanf("%d",&s2.roll);
printf("\nEnter 5 sub. marks");
for(i=0;i<5;i++)
  {
   scanf("%d",&s2.marks[i]);
  }

printf("\nEnter thierd student name\n");
gets(s3.name);
printf("\nenter class");
scanf("%d",&s3.clas);
printf("\nenter roll no.");
scanf("%d",&s3.roll);
printf("\nEnter 5 sub. marks");
for(i=0;i<5;i++)
  {
   scanf("%d",&s3.marks[i]);
  }

printf("\nEnter fourth student name\n");
gets(s4.name);
printf("\nenter class");
scanf("%d",&s4.clas);
printf("\nenter roll no.");
scanf("%d",&s4.roll);
printf("\nEnter 5 sub. marks");
for(i=0;i<5;i++)
  {
   scanf("%d",&s4.marks[i]);
  }

printf("\nEnter fifth student name\n");
gets(s5.name);
printf("\nenter class");
scanf("%d",&s5.clas);
printf("\nenter roll no.");
scanf("%d",&s5.roll);
printf("\nEnter 5 sub. marks");
for(i=0;i<5;i++)
  {
   scanf("%d",&s5.marks[i]);
  }


for(i=0;i<5;i++)
  {
   total+=s1.marks[i];
  }
per=(total*100)/500;
printf("\nstudent name is %s\n",s1.name);
printf("\nstudent class is %d",s1.clas);
printf("\nstudent Roll No. is %d",s1.roll);
printf("\ntotal obtain mark is %d",total);
printf("\nstudent percentage is %d\n",per);
if(per>=60)
 {
  printf("first division");
 }
else
if(per>=45&&per<60)
 {
  printf("second division");
 }
else
if(per>=33&&per<45)
 {
  printf("third division");
 }
else
if(per<33)
 {
  printf("\nfail");
 }
getch();
}

How to earn online:

  1. Step - 1 :

    signup for PayPal, to recieve your online earning
    click here:
    https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL

  2. step - 2 :
    Read & Rate interesting articales to earn money!
    per artical $0.03 to $0.10
    link: http://www.readbud.com/?ref=4096068

  3. EARN MONEY BY BUMPING SITES, DAILY 5 ADS TO CLICK,
    PER CLICK 0.02$, DAILY 0.10$ EARN, MINIMUM PAYOUT 15$,
    YES ITS FREE TO JOIN
    http://www.MoneyBumper.com/Main.cfm?R=134526

Saturday, April 3, 2010

Print all even numbers from 1 to 100


/*Print all even numbers from 1 to 100 */

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
printf("Print  all even numbers from 1 to 100\n");
printf("Even Numbers are:\n");
for(i=1;i<=100;i++)
{
 if(i%2==0)
 printf("%d ",i);
}
getch();
}


  1. Read & Rate interesting articales to earn money!
    per artical $0.03 to $0.10
    link: http://www.readbud.com/?ref=4096068


  2. EARN MONEY BY BUMPING SITES, DAILY 5 ADS TO CLICK,
    PER CLICK 0.02$, DAILY 0.10$ EARN, MINIMUM PAYOUT 15$,
    YES ITS FREE TO JOIN
    http://www.MoneyBumper.com/Main.cfm?R=134526

WAP to check enter no. is prime or not


/*WAP to check enter no. is prime or not*/

#include<stdio.h>
#include<conio.h>
void main()
{
int num1,num,flage,i=2;
clrscr();
printf("enter no.");
scanf("%d",&num);
num1=num/2;
while(i<=num1)
{
if(num%i==0)
{
flage=1;
}
i++;
}
{
if(flage==1)
printf("not prime");
else
printf("prime");
getch();
}
}


  1. Read & Rate interesting articales to earn money!
    per artical $0.03 to $0.10
    link: http://www.readbud.com/?ref=4096068


  2. EARN MONEY BY BUMPING SITES, DAILY 5 ADS TO CLICK,
    PER CLICK 0.02$, DAILY 0.10$ EARN, MINIMUM PAYOUT 15$,
    YES ITS FREE TO JOIN
    http://www.MoneyBumper.com/Main.cfm?R=134526

WAP to check enter no. is palendron or not


/*WAP to check enter no. is palendron or not */

#include<stdio.h>
#include<conio.h>
void main()
{
int n,rem,i,rev=0;
clrscr();
printf("enter no.");
scanf("\n%d",&n);
for(i=n;i>0;)
{
rem=i%10;
rev=rev*10+rem;
i=i/10;
}
printf("%d",rev);
if(n==rev)
{
printf("\nenter no. is palendron");
}
else
{
printf("\nenter no isn't palendron");
}
getch();
}



  1. Read & Rate interesting articales to earn money!
    per artical $0.03 to $0.10
    link: http://www.readbud.com/?ref=4096068


  2. EARN MONEY BY BUMPING SITES, DAILY 5 ADS TO CLICK,
    PER CLICK 0.02$, DAILY 0.10$ EARN, MINIMUM PAYOUT 15$,
    YES ITS FREE TO JOIN
    http://www.MoneyBumper.com/Main.cfm?R=134526

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share