Question: Convert the following C code into ARMv8 Assembly: #include int fac(int n); int main() { int a,i,fact,sum = 0; printf(Enter a value is <9 and
Convert the following C code into ARMv8 Assembly:
#include
printf("Enter a value is <9 and non negative integer : ");>
//for loop 'a' no.of times for(i=0;i<=a;i++){ fact = fac(i); //fac funtion to calculate the factorial sum += fact; } // Printing the series sum printf(" The series sum = %d",sum);
} // fac function int fac(int n) { if (n >= 1) return n*fac(n-1); else return 1; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
