Commit bc627890 authored by s-jdoyle4's avatar s-jdoyle4
Browse files

HW7a answer

parent bc0e17d9
#include <iostream>
int main()
{
using std::cin;
using std::cout;
double x, y;
x=-1; y=1;
while( x < y )
x = ( x*y < 0 ) ? -x : y++;
cout << "x is" << x;
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment