23 August 2018

C Program to calculate square of a given number

//Program to calculate square(^2) of a given number
#include<stdio.h>
int main()
{
    int n,square;
    printf("\n Enter a number to find its square:");
    scanf("%d",&n);
    square=n*n;
    printf("\n\t %d ^ 2 = %d \n",n,square);
return 0;
}

No comments:

Post a Comment

To convert from Upper case to lowercase(A to a)

//converting from Upper to lower(A to a) import java.util.*; class case { public static void main(String args[]) { System.out.pr...