google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Thursday, January 1, 2015

C Programs



1.C program to check odd or even using modulus operator

#include<stdio.h>
main()
{
   int n;
   printf("Enter an integer\n");
   scanf("%d",&n);
    if ( n%2 == 0 )
      printf("Even\n");
   else
      printf("Odd\n");
    return 0;
}


2. Fibonacci Series c language

#include<stdio.h>
 int main()
{
   int n, first = 0, second = 1, next, c;

   printf("Enter the number of terms\n");
   scanf("%d",&n);

   printf("First %d terms of Fibonacci series are :-\n",n);

   for ( c = 0 ; c < n ; c++ )
   {
      if ( c <= 1 )
         next = c;
      else
      {
         next = first + second;
         first = second;
         second = next;
      }
      printf("%d\n",next);
   }
    return 0;
}


3.Palindrome number program c

#include <stdio.h>
 int main()
{
   int n, reverse = 0, temp;
   printf("Enter a number to check if it is a palindrome or not\n");
   scanf("%d",&n);
    temp = n;
    while( temp != 0 )
   {
      reverse = reverse * 10;
      reverse = reverse + temp%10;
      temp = temp/10;
   }

   if ( n == reverse )
      printf("%d is a palindrome number.\n", n);
   else
      printf("%d is not a palindrome number.\n", n);

   return 0;
}


4.C program to check leap year

#include <stdio.h>
 int main()
{
  int year;

  printf("Enter a year to check if it is a leap year\n");
  scanf("%d", &year);

  if ( year%400 == 0)
    printf("%d is a leap year.\n", year);
  else if ( year%100 == 0)
    printf("%d is not a leap year.\n", year);
  else if ( year%4 == 0 )
    printf("%d is a leap year.\n", year);
  else
    printf("%d is not a leap year.\n", year); 
   return 0;
}


5.Prime number program in c language

#include<stdio.h>
 int main()
{
   int n, i = 3, count, c;
    printf("Enter the number of prime numbers required\n");
   scanf("%d",&n);

   if ( n >= 1 )
   {
      printf("First %d prime numbers are :\n",n);
      printf("2\n");
   }

   for ( count = 2 ; count <= n ;  )
   {
      for ( c = 2 ; c <= i - 1 ; c++ )
      {
         if ( i%c == 0 )
            break;
      }
      if ( c == i )
      {
         printf("%d\n",i);
         count++;
      }
      i++;
   }
    return 0;
}


6.C program for prime number or not

#include<stdio.h>
main()
{
   int n, c = 2;
    printf("Enter a number to check if it is prime\n");
   scanf("%d",&n);

   for ( c = 2 ; c <= n - 1 ; c++ )
   {
      if ( n%c == 0 )
      {
         printf("%d is not prime.\n", n);
     break;
      }
   }
   if ( c == n )
      printf("%d is prime.\n", n);
    return 0;
}


7.C program to reverse a number

#include <stdio.h>
 int main()
{
   int n, reverse = 0;
   printf("Enter a number to reverse\n");
   scanf("%d",&n);
    while (n != 0)
   {
      reverse = reverse * 10;
      reverse = reverse + n%10;
      n = n/10;
   }
    printf("Reverse of entered number is = %d\n", reverse);
    return 0;
}



8.Swapping of two numbers in c

#include <stdio.h>
int main()
{
   int x, y, temp;

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

   printf("Before Swapping\nx = %d\ny = %d\n",x,y);

   temp = x;
   x    = y;
   y    = temp;

   printf("After Swapping\nx = %d\ny = %d\n",x,y);

   return 0;
}


9.Factorial program in c using for loop

#include <stdio.h>
 int main()
{
  int c, n, fact = 1;

  printf("Enter a number to calculate it's factorial\n");
  scanf("%d", &n);

  for (c = 1; c <= n; c++)
    fact = fact * c;

  printf("Factorial of %d = %d\n", n, fact);

  return 0;
}


10. Print
    *
  ***
*****
  ***
    *

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

Saturday, December 13, 2014

E-Commerce



E-Commerce:-

Electronic commerce, commonly known as E-commerce or eCommerce, is trading in products or services using computer networks, such as the Internet. Electronic commerce draws on technologies such as mobile commerce, electronic funds transfer, supply chain management, Internet marketing, online transaction processing, electronic data interchange (EDI),Electronic Funds Transfer(EFT), inventory management systems, and automated data collection systems. Modern electronic commerce typically uses the World Wide Web for at least one part of the transaction's life cycle, although it may also use other technologies such as e-mail
Electronic money or e-money, is an evolving term that can have different meanings but in principle involves the use of computer networks and digital stored value systems to store and transmit money. It may have official legal status or not. It may be historical, current or theoretical.

The underlying principle of electronic money involves the use of computer networks such as the Internet and digital stored value systems. Examples of electronic money are bank deposits, electronic funds transfer, direct deposit, payment processors, and digital currencies.

Electronic money can be understood as a way of storing and transmitting conventional money through electronic systems or as digital currency which varies in value and is tradeable as a currency in its own right.

E-Commerce advantages can be broadly classified in three major categories:
Advantages to Organizations:-
1) Using E-Commerce, organization can expand their market to national and international markets with minimum capital investment. An organization can easily locate more customers, best suppliers and suitable business partners across the globe.
2) E-commerce improves the brand image of the company.
3) E-commerce helps organization to provide better customer services
4) E-Commerce reduces paper work a lot.

Advantages to Consumers:-
1) 24x7 support. Customer can do transactions for the product or enquiry about any product/services provided by a company any time, any where from any location. Here 24x7 refers to 24 hours of each seven days of a week.
2) E-Commerce application provides user more options and quicker delivery of products.
3) E-Commerce provides option of virtual auctions.
4) A customer can put review comments about a product and can see what others are buying or see the review comments of other customers before making a final buy.


Advantages to Society:-
1) Customers need not to travel to shop a product thus less traffic on road and low air pollution.
2) E-Commerce helps reducing cost of products so less affluent people can also afford the products.
3) E-Commerce has enabled access to services and products to rural areas as well which are otherwise not available to them.
4) E-Commerce helps government to deliver public services like health care, education, social services at reduced cost and in improved way.


E-Commerce disadvantages can be broadly classified in two major categories:
1)Technical disadvantages
i)There can be lack of system security, reliability or standards owing to poor implementation of e-Commerce.
ii)Software development industry is still evolving and keeps changing rapidly.
iii)There could be software/hardware compatibility issue as some E-Commerce software may be incompatible with some operating system or any other component.
iv) Sometimes, it becomes difficult to integrate E-Commerce software or website with the existing application or databases.

2) Non-Technical disadvantages:-
i)Security/ Privacy: Difficult to ensure security or privacy on online transactions.
ii)Internet access is still not cheaper and is inconvenient to use for many potential customers like one living in remote villages.
iii)Lack of touch or feel of products during online shopping.
iv) Initial cost: The cost of creating / building E-Commerce application in-house may be very high. There could be delay in launching the E-Commerce application due to mistakes, lack of experience.
v) User resistance: User may not trust the site being unknown faceless seller. Such mistrust makes it difficult to make user switch from physical stores to online/virtual stores.

अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...