Python

profilelion77
lab_14.txt

#include <iostream> #include <iomanip> using namespace std; void my_input(int *, int *); void my_compte (int *, int *, int *); void my_results(int *, int *, int *); int main() { int low_value = 0, high_value = 0, my_sum = 0; my_input(&low_value, &high_value); my_compte(&low_value, &high_value, &my_sum); my_results(&low_value, &high_value, &my_sum); return 0; } void my_input(int *L1, int *H1) { cout<<"the application will be calculating"<<endl; cout<<"the sum of all the interger"<<endl; cout<<"Please provide your High value in integer from"<<endl; cin>> *L1; cout<<"Please provide your High value in integer from"<<endl; cin>> *H1; } void my_compte (int *L2, int *H2, int *S) { *S = *L2; int k1 = *L2; for(int n = (*L2);n <(*H2); n++ ) { (*S) = (*S) + (++k1) ; } } void my_results(int *L3, int *H3, int *SD) { cout<<"the sum of all the integers from "<<*L3<< "thruogh"<<*H3<<endl; cout<<"is "<<*SD<<endl; }