Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- typedef double (*func)(double);
- double debounce(func function, double* arr, int size) {
- for (int i = 0; i < size; ++i) {
- std::cout << function(arr[i]) << " ";
- }
- }
- int main() {
- int size;
- std::cin >> size;
- double* arr = new double[size];
- for (int i = 0; i < size; ++i) {
- std::cin >> arr[i];
- }
- debounce(cos, arr, size);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement