Page

Showing Bouncing Images in HTML

<!-- Codes by sourcecodernp.blogspot.com -->
<marquee behavior="alternate" scrollamount="40"><img src="http://www.sourcecodernp.blogspot.com/images/html-codes/marquees/pic1.gif" width="72" height="79" alt="Buzzy bee" /></marquee>
<marquee behavior="alternate" scrollamount="15"><img src="http://www.sourcecodernp.blogspot.com/images/html-codes/marquees/pic2.gif" width="72" height="79" alt="Buzzy bee" /></marquee>
<marquee behavior="alternate" scrollamount="60"><img src="http://www.sourcecodernp.blogspot.com/images/html-codes/marquees/pic3.gif" width="72" height="79" alt="Buzzy bee" /></marquee>
<marquee behavior="alternate" scrollamount="30"><img src="http://www.sourcecodernp.blogspot.com/images/html-codes/marquees/pic4.gif" width="72" height="79" alt="Buzzy bee" /></marquee>

Different speed of scroll in HTML

<!-- Codes by sourcecodernp.blogspot.com -->
<marquee behavior="scroll" direction="left" scrollamount="1">Very slow...</marquee>
<marquee behavior="scroll" direction="left" scrollamount="10">Faster...</marquee>
<marquee behavior="scroll" direction="left" scrollamount="20">Fast...</marquee>
<marquee behavior="scroll" direction="left" scrollamount="50">Lightning!</marquee>


scroll up to down in HTML

<!-- Codes by sourcecodernp.blogspot.com -->
<marquee behavior="scroll" direction="down">Here is some scrolling text... going down!</marquee>

scroll down to up in HTML

<!-- Codes by sourcecodernp.blogspot.com -->
<marquee behavior="scroll" direction="up">Here is some scrolling text... going up!</marquee>

scroll left to right in HTML

<!-- Codes by sourcecodernp.blogspot.com -->
<marquee behavior="scroll" direction="right">Here is some scrolling text... left to right!</marquee>

scroll right to left in HTML

<!-- Codes by sourcecodernp.blogspot.com -->
<marquee behavior="scroll" direction="left">Here is some scrolling text... right to left!</marquee>

Example of switch case in C language

#include <stdio.h>
#include <conio.h>
int main ()
{
   int value = 3;
   switch(value)
   {
   case 1:
      printf("Value is 1 \n" );
      break;
   case 2:
      printf("Value is 2 \n" );
      break;  
   case 3:
      printf("Value is 3 \n" );
      break;
   case 4:
      printf("Value is 4 \n" );
      break;
   default :
      printf("Value is other than 1,2,3,4 \n" );
   }
   return 0;
}

Example Of goto statement in C language


 include <stdio.h>
int main(){
   float num,average,sum;
   int i,n;
   printf("Maximum no. of inputs: ");
   scanf("%d",&n);
   for(i=1;i<=n;++i){
       printf("Enter n%d: ",i);
       scanf("%f",&num);
       if(num<0.0)
       goto jump ; 
       sum=sum+num;
}
jump:
  average=sum/(i-1);       
  printf("Average: %.2f",average);
  return 0;

Example Of Multidimensional Array in C Language


#include <stdio.h>
int main(){
   float a[2][2], b[2][2], c[2][2];
   int i,j;
   printf("Enter the elements of 1st matrix\n");   
   for(i=0;i<2;++i)      
       for(j=0;j<2;++j){
       printf("Enter a%d%d: ",i+1,j+1);
       scanf("%f",&a[i][j]);
       }
   printf("Enter the elements of 2nd matrix\n");
   for(i=0;i<2;++i)
       for(j=0;j<2;++j){
       printf("Enter b%d%d: ",i+1,j+1);
       scanf("%f",&b[i][j]);
       }
   for(i=0;i<2;++i)
       for(j=0;j<2;++j){
       c[i][j]=a[i][j]+b[i][j];  
       }
   printf("\nSum Of Matrix:");
   for(i=0;i<2;++i)
       for(j=0;j<2;++j){
       printf("%.1f\t",c[i][j]);  
           if(j==1)             
              printf("\n");
      }
return 0;
}