Square,Cube,Squareroot of numbers from 1 to n - 👑 सार्थक मुंड S3 🤴🏻

Square,Cube,Squareroot of numbers from 1 to n

Square,Cube,Squareroot of numbers from 1 to n

Write a program (WAP) in C to calculate Square,Cube,Squareroot of numbers from "1 to n".

#include <stdio.h>
#include <math.h>
int main()
{
    int i,n;
    printf("Enter a Number : ");
    scanf("%d",&n);

    printf("No     Square   Cube    Square Root\n",n);
    for(i=1;i<=n;i++)
    {
        printf("%d \t %ld \t %ld \t %.2f\n",i,(i*i),(i*i*i),sqrt((double)i));
    }

    return 0;
}
Try it Yourself ➠
Square,Cube,Squareroot of numbers from 1 to n

Must Read :-
  1. Blogger Tutorial
  2. C Programs
  3. C++ Programs
  4. Java Programs
  5. Python Programs
  6. Programming Notes 
  7. Questions & Answers
  8. My Codes : HTML, CSS & JS
  9. All Subject Notes
Previous article
Next article

Leave Comments

Post a Comment

Articles Ads

Articles Ads 1

Articles Ads 2

Advertisement Ads