C Programming

C Programming


How To Print E-Shape Pyramid In C

Posted: 28 Aug 2014 10:29 AM PDT

Q. How to print or wap to a E-Shape Pyramid in C language as?

*****
*
***
*
*****

Ans.

/*e-shape pyramid in c*/
#include<stdio.h>
int main()
{

 int num=5,r,c;
 for(r=1; r<=num; r++)
 {
   if(r%2==0)
      printf("*");
   else if(r%3==0)
   {
      for(c=1; c<=r; c++)
          printf("*");
   }
   else
   {
      for(c=1; c<=num; c++)
          printf("*");
   }
   printf("\n");
 }
 getch();
 return 0;
}

/***********************************************************
The output of above program would be:
***********************************************************/

Output of E-Shape Pyramid Program In C
Figure: Screenshot for E-Shape Pyramid Program In C


You might also like:

  1. Big list of 98+ C Pyramid Programs
  2. Big list of 100+ C Pyramid Programs


Post a Comment

C Programming

C Programming


How To Design A Number Rhombus Pattern C Program

Posted: 16 Aug 2014 12:23 PM PDT

Q. Write a C program to print the following number rhombus pattern design as:

      1 1
     2   2
    3     3
   4       4
  5         5
   4       4
    3     3
     2   2
      1 1

Ans.

/*c program for how to design a number rhombus pattern*/
#include<stdio.h>
int main()
{
 int num,r,c,sp,n;

 printf("Enter maximum number : ");
 scanf("%d", &num);
 for(r=1; r<=num; r++)
 {
   for(sp=num-r; sp>=1; sp--)
      printf(" ");
   printf("%d", r);
   for(sp=r*2; sp>1; sp--)
      printf(" ");
   printf("%d", r);
   printf("\n");
 }
 for(r=1,n=num-1; r<num; r++,n--)
 {
   for(sp=r; sp>=1; sp--)
      printf(" ");
   printf("%d",n);
   for(sp=n*2; sp>1; sp--)
      printf(" ");
   printf("%d", n);
   printf("\n");
 }
 getch();
 return 0;
}

/*************************************************************
The output of above number rhombus program:
*************************************************************/
Output of How To Design A Number Rhombus Pattern  C Program
Figure: Screenshot for How To Design A Number Rhombus Pattern
 C Program

You Might Also Like:

1. How to make number rhombus design as:
       1
      212
     32123
    4321234
     32123
      212
       1

2. How to make number rhombus design as:
       1
      121
     12321
    1234321
     12321
      121
       1

3. How to make a character rhombus design as:
       A
      ABA
     ABCBA
    ABCDCBA
     ABCBA
      ABA
       A

4. How to make hourglass star design as:
    *********
     *******
      *****
       ***
        *
       ***
      *****
     *******
    *********
   


Post a Comment

C Programming

C Programming


How To Download All Your Google Data As Gmail, Blogger, Youtube etc

Posted: 15 Aug 2014 12:37 PM PDT

Download All Your Google Data with single click - Google Takeout
Figure: Google product list-download a copy
Today anyone keep his/her data on the web (i.e. clouding). Clouding has its own pro and cons. 

As a advantage of clouding, a authorized person can access his/her personal data any time and any location with a single click. But its major disadvantage is dependency at clouding.

What happen if clouding server is crash, there are no-backup, you can lost all your data and there are no options of restore.


Google understand this risk and now google gives the facility of download a copy of all your Google product such as Gmail, Blogger, Bookmark, Youtube, Google+, Orkut, Contacts, Calendar, Voice, Drive, etc. The current status, you can download a copy of  your 19 Google product. 

Very soon the no. of Google product increase and we'll hope that in the future Google give the facility to download your Google data in your system.

How I Download My Google data such as Gmail, Blogger, Youtube etc?

Don't be panic, it is too much easy and user friendly. Just type this URL www.google.com/takeout in address bar of your browser.

if you are already sign in your Google account, you don't need to do anything, above URL will redirect to your desired page. 

If you are not sign in to google account, then you must be signin to your Google account, which one you want to download a copy of your data.



Step 1: 
Download All Google Data Creating Archive
Figure: Download Google Data Creating Archive


Click at "Create an archive" button 

as shown in the figure.

Step 2:

In next you will configure to your data. In this step you can select the no. of Google product, which you want to download data and after download how you can retrieve your Google Data in your personal computer or system.
Download Google Data-Configure Data Archive
Figure: Download Google Data-Configure Data Archive

There are various tools available to access the Google product in your computer or system.

There are three format available to download your all Google data such as .zip, .tgz, .tbz.

If the downloading Google data size larger then 2GB, then it will make multiple zip files i.e. you can download 2gb multiple files zip files.

Now you are ready to creating an archive of your all Google data, so select the Google product for archiving and click at "CREATE ARCHIVE" button as in figure shown.

Step 3:
Download Google Data - In Process/Download
Figure: Download Google Data-In Process/download

In this step, Google collect all your data from various Google product such as Gmail, Blogger, Youtube, Drive etc. So its time consuming.

If you have a large database of Google product then you can logout your account and do your other stuff. Google will work until your all data not collected. 

When this process in done, Google will notify you through email that now you can download your Google data.




Post a Comment

ComputerGeek

ComputerGeek


Update Query using joins in MySql

Posted: 13 Aug 2014 04:04 AM PDT

Update Query using joins in MySql  In this Article, I will show how to write Mysql update query using joins.You can use multiple tables in your single Update query. Example : Departments Table : id Name 1 Accounts 2 R&D 3 Sales Employees Table : id Name Salary Department Id 1


Post a Comment

ComputerGeek

ComputerGeek


Create Complex polygon on GMap using Google Maps API v3

Posted: 12 Aug 2014 10:59 PM PDT

Create Complex polygon on GMap using Google Maps API v3 In this Section, I will show you how to create polygon on gmap using Google Maps API v3 that has complex edges.This example creates polygon using polyline based on user clicks.I have written this script to create complex geofences. This example provides everything you need to draw polylines and polygons.You can use the search box to


Post a Comment

9lessons:Building Native iPhone Applications using HTML, CSS and JavaScript

9lessons:Building Native iPhone Applications using HTML, CSS and JavaScript

Link to 9lessons Programming Blog

Building Native iPhone Applications using HTML, CSS and JavaScript

Posted: 12 Aug 2014 11:29 AM PDT

Mobile revolution has been started, now right time to build mobile applications for your web projects. This tutorial will help you how to develop native iOS mobile applications using HTML, CSS and Jquery. Apache Cordova is a platform for building native applications and it is providing device APIs that helps you to access native device functions such as GEO location or mobile camera. If you are a Apple Mavericks use just implement the following steps.

Building Native Mobile Applications using HTML, CSS and JavaScript

Read more »


Post a Comment

C Programming

C Programming


How to Make a Continuous Diagonal Number Pyramid C program

Posted: 11 Aug 2014 12:06 PM PDT

Q. Write a C program to print the following continues odd reverse number pyramid pattern as:

 1
 6 2
10 7 3
13 11 8 4
15 14 12 9 5

Ans.

Before we start to write the code for above continuous diagonal number pyramid C program, let's focus on below image for better understand the structure of pattern.

How to make a Continuous Diagonal Number Pyramid C Program
Figure: How to make a Continuous Diagonal Number Pyramid C Program


/*c program for continuous diagonal number pyramid pattern*/
#include<stdio.h>
int main()
{

 int num,r,c,m,n,z,a;
 printf("Enter No. of Rows : ");
 scanf("%d", &num);
 z=num;
 n=1;
 for(r=1; r<=num; r++, n=n+7-r, z--)
 {
   m=n;
   a=num-r;
   for(c=1; c<=r; c++, m=m-a)
   {
      printf(" %d ", m);
      a++;
   }
   printf("\n");
 }
 getch();
 return 0;
}

/*************************************************************
The output of above Continuous Diagonal number pyramid pattern C program
***************************************************************/

Output for Continuous Diagonal Number Pyramid C Program
Figure: Screen shot for output of Continuous Diagonal Number Pyramid C Program


You might also like:



Post a Comment

C Programming

C Programming


What is Data Type In C

Posted: 10 Aug 2014 12:04 PM PDT

In the C Programming Language, Data Types refers to an extensive system for declaring variable of different types. 
A data types tells the following things about the related variable:


  • What is the size of the variable?
  • How much its occupies space in storage?
  • How the  variable bit mapped for its operation?
All data types used in C programming, generally defined in standard library header files. In header files, all the characteristic such as size, space etc. of data-types has been defined.

If you want, you can create your own custom data types in C.


You might also like:
  1. char Data Type
  2. int Data Type
  3. long Data Type
  4. double Data Type
  5. float Data Type
  6. Long Double Data Type
  7. function Data Type
  8. pointer Data Type
  9. array Data Type
  10. enum Data Type
  11. struct Data Type
  12. typedef Data Type



Post a Comment

C Programming

C Programming


Number Triangle Pattern C Program

Posted: 09 Aug 2014 09:47 AM PDT

Q. Write a C program to print the following number triangle pattern as:

0
101
21012
3210123
432101234
54321012345

Ans.

/*c program for number triangle pattern*/
#include<stdio.h>
int main()
{

 int num,r,c,m,n;
 printf("Enter maximum number : ");
 scanf("%d", &num);
 for(r=1,m=0; r<=num+1; r++,m++)
 {
   for(c=1,n=m; c<=r; c++,n--)
       printf("%d", n);
   for(c=1; c<r; c++)
       printf("%d", c);
   printf("\n");
 }
 getch();
 return 0;
}

/*************************************************************
The output of above number triangle pattern program as
************************************************************/

Output for Number Triangle Pattern C Program
Figure: Screen shot for Number Triangle Pattern C program

You might also like:

  1. 110+ C Pyramid Triangle Pattern C Programs


Post a Comment

C Programming

C Programming


How to Add Binary Numbers In Computer

Posted: 07 Aug 2014 11:25 AM PDT

What is Binary Number System in Computer?
In binary number system, there are only two number available to represent the numeric values says 0 and 1.
There are 2 symbol (i.e. 0 and 1) used in binary number system, so it is also called base-2 numerical system.

Example of Binary Number:
011, 1110, 101001, 111001011

Before we start that how to add binary numbers, first of all you should know that what will be values of decimal in binary, so below tables give you reference or cross check that binary number addition is correct or incorrect.



S.No. Decimal Binary
1. 0 0
2. 1 1
3. 2 10
4. 3 11
5. 4 100
6. 5 101
7. 6 110
8. 7 111
9. 8 1000
10. 9 1001
11. 10 1010
Table: Comparison of Decimal and Binary Numbers

How to add binary number in computer?
It is simple as we add the decimal number. keep in mind the following trick to addition of binary numbers as:
Rules No. Condition Result Remark
1. 0 + 0 0 -
2. 0 + 1 1 -
3. 1 + 0 1 -
4. 1 + 1 0 carry 1 to next column
5. 1 + 1 + 1 1 carry 1 to next column
Table: Binary number addition rules

Let's we understand the how to add binary number in computer through an example as:
Let's we want to add two decimal number 8+4=12.
When we convert these number decimal to binary, we get:
8 in Binary 1 0 0 0 and,
4 in Binary 1 0 0
Below figure shows the step by step with explanation that how to add these binary numbers:

How to add two binary numbers in computer
Figure: How to add two binary numbers in computer
You can cross check the your answer, through convert the binary value to decimal and add them as we are doing in daily life, after that compare the both values if both are equal, thump's up friend, you  done it, Cheers!!
Four your practice, add the following binary numbers:
(for your  cross check binary addition result, i also write down answer.)

   1 0 1 0 0                      0 0 1 1 1 0                         1 1 0                      1 1 0 0 1 1 1
+ 0 1 1 0 1                  + 1 0 0 1 1 0                       + 1 1 0                  + 1 0 1 1 0 1 1
------------------                 --------------------                ------------                ---------------------
 1 0 0 0 0 1                     1 0 1 1 0 0                      1 1 0 0                   1 1 0 0 0 0 1 0
------------------                  --------------------               ------------                 --------------------


You might also like:

  1. How to convert Decimal number to Binary numbers in Computer?


Post a Comment

9lessons:Manage Your Smartphone Easily with MoboRobo Now

9lessons:Manage Your Smartphone Easily with MoboRobo Now

Link to 9lessons Programming Blog

Manage Your Smartphone Easily with MoboRobo Now

Posted: 08 Aug 2014 03:37 AM PDT

Having a Smartphone is not a big deal nowadays. It has become so mainly due to availability of Smartphones that are suitable for different budgets. Although there are a number of exceptions, major issue of low-budget Smartphones is their lower screen size. Albeit the fact that you might not face issues while performing common tasks like listening to music and messaging on WhatsApp, the notable issues will be when you want to manage information in your device such as editing contacts, downloading applications massively, managing media files including videos and music etc.
Read more »


Post a Comment