Wednesday 16 November 2011

Compute Square and Cube With Turbo C++

Code For Turbo C++
#include<stdio.h>
#include<conio.h>

int num,sq,cube;
comp_sq();
comp_cube();
int main()
{
    clrscr();
    printf("Enter Number:");
    scanf("%d",&num);
    comp_sq();
    comp_cube();
    getch();
    return 0;
}
comp_sq()
{
    sq=num*num;
    printf("The Square of %d is: %d\n",num,sq);
}
comp_cube()
{
    cube=num*num*num;
    printf("The cube of %d is: %d\n",num,cube);
}

No comments:

Post a Comment

What is Information Technology?

Information Technology, or IT,
-is the study, design, creation, utilization, support, and management of computer-based information systems, especially software applications and computer hardware.
IT is not limited solely to computers though. With technologies quickly developing in the fields of cell phones, PDAs and other handheld devices, the field of IT is quickly moving from compartmentalized computer-focused areas to other forms of mobile technology.