This is driving me insane. I had it running earlier but accidentally saved over top of it so I redid it and now its not working. I cant for the life of me find out why.
//Lab 3-1: Print out the values of square root of all
//integers divisible by 5 between 5 and 100.
#include <iostream>
#include <math.h>
usingnamespace std;
void print();
int main()
{
for (int i = 5; i <= 100; i += 5){
print();
}
cin.get();
return 0;
}
void print()
{
cout << "The square root of " << i << " is " << sqrt(i) << "." << endl;
}
//Lab 3-1: Print out the values of square root of all
//integers divisible by 5 between 5 and 100.
#include <iostream>
#include <math.h>
usingnamespace std;
void print(int i);
int main()
{
for (int i = 5; i <= 100; i += 5){
print(i);
}
cin.get();
return 0;
}
void print(int i)
{
cout << "The square root of " << i << " is " << sqrt(i) << "." << endl;
}