Thread: i have been struggling with this exercise

  1. #1
    Registered User
    Join Date
    Jun 2020
    Posts
    3

    Post i have been struggling with this exercise

    Problem1:
    - write a program to enter a natural number n and find all sphenic number from 1 to n using Recursion(combined with iteration if necessaary)


    Note: A sphenic number is a product of p*q*r where p,q and r are three distinct prime numbers.
    Example: 30 = 2*3*5, 42=2*3*7, 66=2*3*11.
    30, 42, 66, 78, 102, 105, 110, 114, 130, 138, 154, 165,... are sphenic numbers.


    - Calculate the complexity of your program(Best scenao, Worst scenano, Average). Justify your answer.


    Problem2:
    - Write the program to solve Problem1 using Linked List ADT with necessaary function and Linked List principle

  2. #2
    Registered User
    Join Date
    Jun 2020
    Posts
    3
    Sphenic number

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    So what's your actual question?

    You need to demonstrate actual effort like
    - code which works, and you don't know what to do next
    - code which doesn't work, and you don't know why

    In short, dumping your assignment with zero effort won't result in us posting a polished answer you can just hand in.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. i have been struggling with this exercise
    By luongday in forum C Programming
    Replies: 1
    Last Post: 06-03-2020, 03:31 AM
  2. Struggling to see what I did wrong
    By awsdert in forum C Programming
    Replies: 7
    Last Post: 07-06-2019, 02:49 AM
  3. Struggling with VEX programing
    By sixtysix in forum C Programming
    Replies: 1
    Last Post: 05-16-2016, 04:16 AM
  4. Struggling With the Next Step.
    By Dobblaar in forum C Programming
    Replies: 8
    Last Post: 11-28-2013, 05:06 PM
  5. Need some help with this code. Struggling
    By NoobCoder85 in forum C++ Programming
    Replies: 2
    Last Post: 11-25-2013, 02:34 AM

Tags for this Thread