Submit Screenshot of My Code and My Output For Q1
Submit Screenshot of My Code and My Output For Q1
Submit Screenshot of My Code and My Output For Q1
a- Write C program that read number x from the user. b- Then write function that calculate the
results as in f(x)
Answer:
#include <stdio.h>
int f(int);
int main() {
int x;
printf("Please enter the number:");
scanf("%d", &x);
x=f(x);
printf("The result is :%d \n",x);
return 0;
}
return x;
}
Answer:
Example one:
Inputs num1=1, num2=4, num3=0
Example two:
Inputs num1=26, num2=10, num3=5
Example three:
Inputs num1=130, num2=178, num3=290