Search This Blog

Wednesday, July 27, 2011

pass,fail,first,distinction


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int marks;
 
   printf ("Calculate my class: ");
   scanf ("%d", &marks);
   printf ("You entered: %d\n", marks );
 


if(marks>45 && marks<=60)
printf("Pass Class\n");
 else
  if(marks>60 && marks<=70)
printf("First Class \n");
else
if(marks>70 && marks<=100)
printf("Distinction\n");
else
if(marks>-1 && marks<=45)
printf("Fail\n");
   return (0);
}

vowel or constant


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


using namespace std;
int main(void)
{
   /* declarations */
 char ch;
 
   printf ("Enter one alphabet : ");
   scanf ("%c", &ch);
   printf ("Alphabet entered: %c\n", ch );
 
   if(ch=='a'||ch=='A'||ch=='e'||ch=='E'||ch=='i'||ch=='I'||ch=='o'||ch=='O'||ch=='u'||ch=='U')
printf("it is a vowel \n");
 else
 
printf("it is a constant \n");

getch();

return (0);
}

leap year or not


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


using namespace std;
int main()
{
   /* declarations */
   int year;
 
   printf ("Enter the year : ");
   scanf ("%d", &year);
   printf ("Year entered: %d\n", year );
 
 
if(year % 4 == 0)
printf("the year is a leap year \n");
 else
 
printf("the year is not a leap year \n");

getch();

return (0);
}

given number is +,- or zero


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int a;
 
   printf ("Enter value of a: ");
   scanf ("%d", &a);
   printf ("You entered: %d\n", a );
 
 
if(a>0)
printf("a is the positive integer \n");
 else
  if(a<0)
printf("a is the negative integer\n");
else
if(a == 0)
printf("a is equal to zero \n");

   return (0);
}

given number is odd or even


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int a;
 
   printf ("Enter value of a: ");
   scanf ("%d", &a);
   printf ("You entered: %d\n", a );
 
   if(a % 2 == 0)
printf("a is an even integer");
else
printf("a is an odd integer\n");
 



   return (0);
}

minimum of 3 numbers


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int a,b,c;
 
   printf ("Enter value of a: ");
   scanf ("%d", &a);
   printf ("You entered: %d\n", a );
 
   printf ("Enter value of b: ");
   scanf ("%d", &b);
   printf ("You entered: %d\n", b );

 printf ("Enter value of c: ");
   scanf ("%d", &c);
   printf ("You entered: %d\n", c );

if(a<b && a<c)
printf("a is lesser than b and c \n");
 else
  if(b<a && b<c)
printf("b is lesser than a and c \n");
else
if(c<a && c<b)
printf("c is lesser than a and b \n");

   return (0);
}

maximum of 3 numbers


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int a,b,c;
 
   printf ("Enter value of a: ");
   scanf ("%d", &a);
   printf ("You entered: %d\n", a );
 
   printf ("Enter value of b: ");
   scanf ("%d", &b);
   printf ("You entered: %d\n", b );

 printf ("Enter value of c: ");
   scanf ("%d", &c);
   printf ("You entered: %d\n", c );

if(a>b && a>c)
printf("a is greater than b and c \n");
 else
  if(b>a && b>c)
printf("b is greater than a and c \n");
else
if(c>a && c>b)
printf("c is greater than a and b \n");

   return (0);
}

minimum of two numbers


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int a,b;
 
   printf ("Enter value of a: ");
   scanf ("%d", &a);
   printf ("You entered: %d\n", a );
 
   printf ("Enter value of b: ");
   scanf ("%d", &b);
   printf ("You entered: %d\n", b );
 
if(a < b)
{
printf("Value of a is lesser than b \n");
}
else
{
printf("Value of b is lesser than a \n");
}



   return (0);
}

maximum of two numbers


#include <stdio.h>

int
main (void)
{
   /* declarations */
   int a,b;
 
   printf ("Enter value of a: ");
   scanf ("%d", &a);
   printf ("You entered: %d\n", a );
 
   printf ("Enter value of b: ");
   scanf ("%d", &b);
   printf ("You entered: %d\n", b );
 
if(a > b)
{
printf("Value of a is greater than b \n");
}
else
{
printf("Value of b is greater than a \n");
}



   return (0);
}

Wednesday, July 20, 2011

Unable to boot - please use a kernel appropriate for your CPU..virtual box error

just enable PAE/NX for the vm guest. this should solve the issue...


PAE/NX is available in settings->system->processor..
you are done

import your facebook friends on google+

steps:-
1)sign in for yahoo...
2)go into yahoo mail
3)go to contacts tab
4)go to import tab..you will see facebook logo and follow the steps
5)you will all your friend list,now go to export all...you have to export it as yahoocsv file..now yu can see that file which we have downloaded.
6)loginto gmail.go to contacts tab ...go to new group..type group name...now go to the name you have given...click on it...click on more actions...choose imports choose file you have downloaded from yahoo...its all done...thank you

how to find google plus app on app store

If you can't find the google+ app on the app store, search "Google Huddle" and it will pop up

How to disable power-on and administrator password from bios

go to bios by pressing F10..go to security ..select power-on password by pressing enter..give your old password, press enter then...now press enter twice...we do not have to write anything in new password and  re-type password....thats it you are done...follow above steps for administrator password also