Sunday, September 11, 2022

Find maximum integer

 // Find maximum integer

#include <iostream>

using namespace std;

int

main ()

{

  int max_int = 1, b = 1;

  do

    { max_int = b;  b = max_int + 1;}

  while (b > max_int);

  cout << "Maximum integer=" << max_int << ", b=" << b;

  return 0;

}

No comments:

Post a Comment

NaCl.xyz Generator with Interactive 3D Visualization

NaCl.xyz Generator with Interactive 3D Visualization NaCl.xyz Generator with Interactive 3D Visualization ...