id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

amjadm@miamioh.edu assignment3part2 > strPrime
prev  |  next  |  chance

Given a positive int value num, return a new string holding all prime values less than equal num separated by a space. There should be no space at the beginning or the end of the returned string.


strPrime(2) → "2"
strPrime(5) → "2 3 5"
strPrime(-1) → ""

...Save, Compile, Run (ctrl-enter)

public String strPrime(int num) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 201

Copyright Nick Parlante 2017 - privacy