Answered step by step
Verified Expert Solution
Question
1 Approved Answer
// DO NOT CHANGE THESE LINES #ifdef _GRADING_ #include ../midterm1.h #endif //////////////////////////// #define _CRT_SECURE_NO_WARNINGS #include #include int IsDivisible(int a, int b) { // your code
// DO NOT CHANGE THESE LINES #ifdef _GRADING_ #include "../midterm1.h" #endif //////////////////////////// #define _CRT_SECURE_NO_WARNINGS #include#include int IsDivisible(int a, int b) { // your code here } double FormulaSum(double data[], int count) { // your code here } double FifthRoot(double x) { // your code here } int main() { // Problem 1 for (int i = 10; i <= 15; i++) { for (int j = 3; j <= 7; j++) { printf("%i %s divisible by %i ", i, IsDivisible(i, j) ? "is" : "is not", j); } } // Problem 2 double data1[] = { 3.1, 2.9, 2.8, 1.7, 1.4 }; double data2[] = { -1.7, 3.5, 28.3, 15.6, -12.1, 49.2, -33.9, 1.0 }; printf(" sum of data1 is %.2lf ", FormulaSum(data1, sizeof(data1) / sizeof(double))); printf("sum of data2 is %.2lf ", FormulaSum(data2, sizeof(data2) / sizeof(double))); // Problem 3 for (int i = 2; i < 10; i++) printf("The fifth root of %i is %.3lf ", i, FifthRoot(i)); return 0; }
I just have to know the codes can someone help me with that thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started