This preview shows page 1. Sign up to view the full content.
Unformatted text preview: end e % b) while loops. Use the following while loop to count the number of % perfect squares between 1 and N inclusive. Store your answer in the % variable B. Replace every ? with the necessary code. You must utilize % this while loop to receive any credit. % num = 1; B = 0; while B<num % change this line if mod(sqrt(N),1)==0 % change this line (it finds where the square % root of a number is an integer) B=B+1; end num = num+1; end...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.
- Spring '08