Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(C PROGRAM), force of stress applied to an area is force divided by area. make a

ID: 3917183 • Letter: #

Question

(C PROGRAM), force of stress applied to an area is force divided by area. make a program allowing keyboard entry. a user wants to adjust the maximum force applied on a 200 square meter area. The stress cannot exceed 0.4N/m2. If the stress created due to an entered force is greater than the 0.4, the program should loop until the user enters a force which creates a stress within the specified limits. It is assumed that the program will ask the user to continue to enter a new force until an allowable stress is achieved.   

(C PROGRAM)

Explanation / Answer

#include <stdio.h>

int main() {
   double force, fos;
   while(1) {
       printf("Enter force: ");
       scanf("%lf", &force);
       fos = force / 200;
       printf("Force of stress is %lf ", fos);
       if(fos >= 0 && fos <= 0.4) {
           break;
       }
       printf("Force of strees is out of allowed limit(0-0.4). Try Again! ");
   }
   return 0;
}