Help with this c++ program?

2016-03-29 12:25 am
We have a problem that asks us to write a void function that uses two nested for loops and the modulus operator to print out prime n integers. The function prototype is primeGen(int n). The only problem I am having is returning the value of i back to the main function can someone help me please?
http://codepad.org/KxutY78T

回答 (1)

2016-03-29 12:40 am
you declared the function void but are returning a value...
what value do you want to return and why?
your function should print out the primes that it finds.


收錄日期: 2021-05-01 20:36:38
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20160328162555AAjGcZO

檢視 Wayback Machine 備份