أمير الغنيمي
23-05-2007, 11:20 AM
أريد حل تلك التمارين مع الشرح لو سمحتم لأنها مهمة حيث انها قد ستدخل فالاختبار....
1-
write a c++ main that recives akeyboard input value,stores it in a variable x,then calls a funcation with that variable as input parameter.the function checks whether the passed parameter is odd or even and return 0 or 1 accoringly.the main displays asuitable message according to the returned value.test the performance with different input values of x (say 19,24,102,0...). end
2-
A main and power to compute the first argument raised a power equal to the second argument (with return and without return) -in case of void function let the output be produced from the main then from the function. end
3-
A program that detects and displays the value and the index(subscript) of the element having the maximum value in a floating point array of 10 element. end
4-
Write a C++ program that squres the contents of array arr_1 and stores them onto the array arr_2.Array arr_1 is filled with values from 1 to 100. end
1-
write a c++ main that recives akeyboard input value,stores it in a variable x,then calls a funcation with that variable as input parameter.the function checks whether the passed parameter is odd or even and return 0 or 1 accoringly.the main displays asuitable message according to the returned value.test the performance with different input values of x (say 19,24,102,0...). end
2-
A main and power to compute the first argument raised a power equal to the second argument (with return and without return) -in case of void function let the output be produced from the main then from the function. end
3-
A program that detects and displays the value and the index(subscript) of the element having the maximum value in a floating point array of 10 element. end
4-
Write a C++ program that squres the contents of array arr_1 and stores them onto the array arr_2.Array arr_1 is filled with values from 1 to 100. end