diff --git a/two b/two new file mode 100755 index 0000000000000000000000000000000000000000..c68a172e3533325f35d1233ab146cb0af67e8ae3 Binary files /dev/null and b/two differ diff --git a/two.c b/two.c index 794afd44e6e5ac27294ae06cfd67ab77e5da625e..9be52f1b4512ff82551b66ff1fecadaafcbc40d9 100644 --- a/two.c +++ b/two.c @@ -1,30 +1,28 @@ -#include <stdio.h> -#include <time.h> -#include <stdlib.h> - +#include <stdio.h> +#include <time.h> +#include <stdlib.h> +//function prototype int square(int n); int input_num(); - +//main function int main(){ int hold; hold = input_num(); int (*fnt)(int); fnt = □ - - printf("the square root: %d\n",fnt(hold)); + printf("the square rooot: %d\n",fnt(hold)); } -int square(int n){ +int square(int n){ // the simple function to calculate square root int res = n * n; return res; } - +//function to take a input from a user int input_num(){ char num[20]; - printf("Enter the number for square: "); + printf("Enter the numberrr for square: "); fgets(num, sizeof(num), stdin); - return atoi(num); - + return atoi(num); // Convert string input to integer and return it } \ No newline at end of file