Thank you all for being with us.
Learn, Create and Implement.

  • Build Concept

    You can build your concept in programming on programsway.com.

  • Examples

    There are many C Programming examples on programsway.com.

  • Ask Questions

    Ask questions and get quick answers. Request any program and we will publish that program.

  • Friday 8 March 2013

    This is a example of simple program to find out the square and cube of a number.
    This program can be extended to find out any power of a number using recursion function.

    //This is a program to find out Square and Cube of a given number
    #include<stdio.h>
    int main()
    {
    int num,sqrt,cube;
    printf("\nEnter a number to Square and Cube ");
    scanf("%d",&num);
    sqrt=num*num;
    cube=num*num*num;
    printf("\nThe Square of the give number is %d\nand the cube of the give number is %d",sqrt,cube);
    return 0;
    }


    0 comments:

    Post a Comment