Results 1 to 3 of 3

Thread: Program for finding cubic root of a number

  1. #1
    Geek_Guest
    Guest

    Program for finding cubic root of a number

    How to write program for finding cubic root of a number?

    Question asked by visitor vidhya


  2. #2
    Junior Member
    Join Date
    Feb 2007
    Answers
    7

    Smile Re: Program for finding cubic root of a number

    main()
    {
    //read the value n;
    for(i=1;i<=n;i++)
    {
    a=i*i*i;
    if(a==n)
    cout<<"cubic root is "<<a;
    }
    }


  3. #3
    Junior Member
    Join Date
    Aug 2007
    Answers
    2

    Smile Re: Program for finding cubic root of a number

    #include<iostream.h>
    #include<conio.h>
    #include<math.h>
    main(void)
    { int i,c,n;
    cout<<"enter a no\n";
    cin>>n;
    for(i=1;i<=n;i++)
    { c=i*i*i;
    if(c==n)
    { cout<<"cube root:"<<i;
    break;}
    }
    cout<<"out of loop ans got\n";
    getch();
    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact