Expressing Imperative Programs Functionally (1 of 4)
lThink of the program as represented by its flowchart.
lint fac(int n)
{
int x, a;
x = 1; a = 1;
while( x <= n )
  {
  a = a*x;
  x = x+1;
  }
return a;
}
x = 1;
a = 1;
a = a*x;
x = x+1;
x <= n
yes
no
input n
output a