24 August 2018

C Program to print cube(s) from 1 to n

//Program to print cube(s) from 1 to n
#include<stdio.h>
int main()
{
    int n,i,cube;
    printf("\n Enter up to which number you want to find cube(s):");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
       {
        cube=i*i*i;
        printf("\n\t %d ^ 3 = %d",i,cube);
       }
    printf("\n");
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...