(Find the largest n such that 2n < 30,000)) Use a while loop to find the largest integer n such that 2n is less than 30,000.

PHOTO EMBED

Sat Oct 24 2020 01:37:34 GMT+0000 (UTC)

Saved by @mahmoud hussein #c++

#include <iostream>
#include<cmath>
#include<ctime>
#include<string>
#include <iomanip>
#include <fstream>

using namespace std;

int main()
{
	
	int n = 1;
	int largest = 0;
	while (n*n<30000)
	{
		if (n > largest)
		{
			largest = n;
		}
		n++;
	}
	cout << "the largest number is " << largest;
	
	
		

	
	
}
content_copyCOPY

http://cpp.sh/