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

COMP1200-C- assign 03 Read all instruction:s before beginning your work. NOTE Du

ID: 3747379 • Letter: C

Question

COMP1200-C- assign 03 Read all instruction:s before beginning your work. NOTE Due 11:59 pm - Friday - Sept. 14,2018 Submit assign03a.c and assign03b.cYour submitted filefs) MUST be via Canvas spelled and cased as instructed. Problem: from MATLAB for Engineers, Moore, Problem 3.4 Chemical reaction rates are proportional to a rate constant k that changes with temperature according to the Arrhenius equation. The Arrhenius equation acivaton energy rate “nstant RTkelvin temperature gas consant frequency factor or pre-exponental factor quanity, e Instructions for all assign scripts See Standards for Documentation of C Programs on the Canvas Resources page Insert comments at the top and throughout each file Include the follow comments at the beginning of this (and ALL) files. % submitter's name, GROUP # o Grade of ZERO for files if submitter name not part of Canvas group. Not in a group? GROUP# is “none". For your own protection, // other group members' names // program file name, ex. assign02a.c ALL STUDENTS' NAMES MUSTMATCH NAMES ON CANVAS /1 due date of the assignment // statement(s) about collaboration // Use the algorithm given as comments throughout your program. type "none" if submitting alone. Zero points for comments if no collaboration statement a short narrative about what the file does o Observe the instructor's rule for naming variables. o o o 5 points for absence of any of these required comments at the top of each file. O Use ALL CAPS for constants variable names. Start other variables with lower case. Use descriptive variable names. Use Sample Input Output as a guide. If you do not submit individually, there will be a 5 POINTS PENALTY for not joininga group on Canvas. Groups can be 2-4 students. DO NOT join a group unless you have worked with the other members. If you do, you will be removed from the group and given the grade of zero. Code clarity: o Indent blocks as needed. Use Generate CDS o Divide your solution program code into sections as noted in the algorithm. Use blank lines as needed to group statements. o Use section comments as well as the algorithm step comments. Use comments to show units. Use the CONSTANT and variable names; not numbers. No extra output, i.e. use semicolons Program: assign03a.c Chemical reaction rates are proportional to a rate constant k that changes with temperature according to the Arrhenius equation. Given a certain reaction: 8000 cal.mol Activation energy Universal gas constant -1.9870 cal/mol K Frequency factor 1200 min Modify assign02b.c to compute and display the results with appropriate labels if entry is within the 100K-500K range. Otherwise, only a message will be printed. COMP 1200C-Fall 2018-assign03-p. 1 of 3

Explanation / Answer

If you have any doubts, please give me comment...

1)

#include<stdio.h>

#include<math.h>

const double E = 2.71828;

const int A = 1200;

const int EA = 8000;

const double R = 1.9870;

int main(){

double temp;

printf("Enter a temperature (100k-500k): ");

scanf("%lf", &temp);

if(temp<100 || temp>500){

printf("Temperature out of 100-500K range. Programming ending. ");

return 0;

}

else{

double inc_temp;

printf("Enter the increase in temperature. ");

printf("Max temperature is 500K. Maximum increase is %.1lf. ", (500-temp));

scanf("%lf", &inc_temp);

if(inc_temp+temp>500){

printf("Temperature increase is too large. Programming ending. ");

return 0;

}

else{

double rate_constant = A*pow(E, EA/(R*temp));

printf("Temperature (K):%.1f ", temp);

printf("Rate Constant : %.2lf ", rate_constant);

rate_constant = A*pow(E, EA/(R*(temp+inc_temp)));

printf("Temperature (K): %.1lf ", (inc_temp+temp));

printf("Rate Constant : %.2f ", rate_constant);

}

}

return 0;

}

2)

#include<stdio.h>

#include<math.h>

const double E = 2.71828;

const int A = 1200;

const int EA = 8000;

const double R = 1.9870;

int main(){

double temp;

printf("Enter a temperature (100k-500k): ");

scanf("%lf", &temp);

if(temp<100 || temp>500){

printf("Temperature out of 100-500K range. Programming ending. ");

return 0;

}

else{

double rate_constant = A*pow(E, EA/(R*temp));

printf("Temperature (K):%.1f ", temp);

printf("Rate Constant : %.2lf ", rate_constant);

}

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote