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

answer to 7c

parent 80f67324
#include <iostream>
int main()
{
using std::cin;
using std::cout;
int i; double x;
x=1;
for( i=1; i<=10; i++ )
if( i > 6 ) x -= i;
else if( i > 3) x = 2*i;
else x--;
cout << "x is" << x;
return 0;
}
File added
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