marq

Dr. Charles Simonyi is the Father of Modern Microsoft Excel                                           JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, later LiveScript, and finally renamed to JavaScript.                                           The word "Biology" is firstly used by Lamarck and Treviranus                                           Hippocrates (460-370 bc) is known as father of medicine.                                           Galene, 130-200 is known as father of Experimental Physology                                           Aristotle (384-322 BC) is known as Father of Zoology because he wrote the construction and behavior of different animals in his book "Historia animalium"                                           Theophrastus(370-285 BC) is known as father of Botany because he wrote about 500 different plants in his book "Historia Plantarum".                                           John Resig is known as Father of Jquery -                                          HTML is a markup language which is use to design web pages. It was invented in 1990 by Tim Berners-Lee.                                                                The Google was founded by Larry Page and Sergey Brin.                                                                Rasmus Lerdorf was the original creator of PHP. It was first released in 1995.                                                               Facebook was founded by Mark Zuckerberg                                                               Bjarne Stroustrup, creator of C++.                                                                Dennis Ritchie creator of C                                                                                                                              James Gosling, also known as the "Father of Java"                                          At 11.44%, Bihar is India's fastest growing state                                          Father of HTML -Tim Berners Lee                                          orkut was created by Orkut Büyükkökten, a Turkish software engineer                    Photoshop: It came about after Thomas Knoll, a PhD student at the University of Michigan created a program to display grayscale images on a monochrome monitor which at the time was called 'Display'.

FOR statement is as follows:

structure of for loop
for(initial=value;condition;increment)
instruction;

Now for an example:

example-7
main()
{
int row,column;
puts("\t\tMY Handy multipication table");
for(row=1;tow<=10;row++)
{ for(column=1;column<=10;column++)
printf("%6d", row*column);
putchar('\n');
 }
}
 The output is a multipication table of 10x10 size.


Level/s:4
* * * *
* * *
* *
*


#include<stdio.h>
#include<conio.h>
main()
{
  int z,a,b,c;
  clrscr();
  printf("Level/s:");
  scanf("%d",&c);
  for(z=c;z>=1;z--)
 {
   for(a=0;a<=z;a++)
  {
    printf(" ");
  }
  for(b=c;b>=1;b--)
  {
    printf("*");
  }
  c=c-1;
  printf("\n ");
 }
  getch();
} 
______________________________________________________________________________


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

int main()

{

int M,N;

printf("enter the ranges do you want diaplay\n");

scanf("%d%d",&M,&N);

printf("the numbers between %d to %d \n",M,N);

for(;M<=N;M++)
printf("%d  ",M);

getch();

}  


Display the leap Years between 1000 and 2000

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

int main()

{

int loop;

printf("the leap year or not between 1000 to 2000\n");

for(loop=1000;loop<=2000;loop++)
{

if(loop%4==0)
printf("%d  leap year\n",loop);
else
printf("%d  not\n",loop);
}
getch();











c program to print patterns of numbers and stars

These program prints various different patterns of numbers and stars. These codes illustrate how to create various patterns using c programming. Most of these c programs involve usage of nested loops and space. A pattern of numbers, star or characters is a way of arranging these in some logical manner or they may form a sequence. Some of these patterns are triangles which have special importance in mathematics. Some patterns are symmetrical while other are not. Please see the complete page and look at comments for many different patterns.
*
   ***
  *****
 *******
*********







#include<stdio.h>
 
main()
{
   int row, c, n, temp;
 
   printf("Enter the number of rows in pyramid of stars you wish to see ");
   scanf("%d",&n);
 
   temp = n;
 
   for ( row = 1 ; row <= n ; row++ )
   {
      for ( c = 1 ; c < temp ; c++ )
         printf(" ");
 
      temp--;
 
      for ( c = 1 ; c <= 2*row - 1 ; c++ )
         printf("*");
 
      printf("\n");
   }
 
   return 0;
}





12345
 1234
  123
   12
    1


#include<stdio.h>
 
main()
{
   int n, c, k, space;
 
   scanf("%d", &n);
 
   space = 0;
 
   for ( k = n ; k >= 1 ; k-- )
   {
       for ( c = 1 ; c <= space ; c++ )
       printf(" ");
 
       space++;
 
       for ( c = 1 ; c <= k ; c++)
          printf("%d", c);
 
       printf("\n");
   }
 
   return 0;
}


A B C D E F G H
 A B C D E F G
  A B C D E F 
   A B C D E
    A B C D 
     A B C
      A B
       A


#include<stdio.h>
 
main()
{
      char ch = 'A';
      int n, c, k, space = 0;
 
      scanf("%d", &n);
 
      for ( k = n ; k >= 1 ; k-- )
      {
          for ( c = 1 ; c <= space ; c++)
              printf(" ");
 
          space++;
 
          for ( c = 1 ; c <= k ; c++ )
          {
             printf("%c ", ch); 
             ch++;
          }
 
          printf("\n");
          ch = 'A';
      }
 
      return 0;
}




1
01
010
1010
10101

#include<stdio.h>
 
main()
{
      int n, c, k, num = 1;
 
      scanf("%d", &n);
 
      for ( c = 1 ; c <= n ; c++ )
      {
          for ( k = 1 ; k <= c ; k++ )
          {
              printf("%d", num);
 
              if ( num == 0 )
                 num = 1;
              else
                 num = 0;
          }
          printf("\n");
      }
 
      return 0;
}




p
pr
pro
prog
progr
progra
program


#include<stdio.h>
#include<string.h>
 
main()
{
      char string[100];
      int c, k, length;
 
      printf("Enter a string\n");
      gets(string);
 
      length = strlen(string);
 
      for ( c = 0 ; c < length ; c++ )
      {
          for( k = 0 ; k <= c ; k++ )
          {
               printf("%c", string[k]);
          }
          printf("\n");
      }
 
      return 0;
}

1
121
12321
1234321
123454321


#include<stdio.h>
 
main()
{
      int n, c, k, x = 1;
 
      scanf("%d", &n);
 
      for ( c = 1 ; c <= n ; c++ )
      {
          for ( k = 1 ; k <= c ; k++ )
          {
              printf("%d", x);
              x++;
          }
 
          x--;
 
          for ( k = 1 ; k <= c - 1 ; k++ )
          {
              x--;
              printf("%d", x);
          }
 
          printf("\n");
          x = 1;
      }
 
      return 0;
}




No comments:

Post a Comment