Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE DRAW THE FLOW CHART FOR THE FOLLOWING CODES.THANK YOU SO MUCH. #include 2: #include 3: #define M 500 4: #define Pi 3.142 5: void

PLEASE DRAW THE FLOW CHART FOR THE FOLLOWING CODES.THANK YOU SO MUCH.

#include 2: #include 3: #define M 500 4: #define Pi 3.142 5: void print() 6: { 7: float arr[4]={165,300,58,1.10}; 8: printf("\t\tTEXT A "); 9: return; 10: } 11: 12: void facing() 13: { 14: int i; 15: char arr[M]={"1) Q."}; 16: for(i=0;arr[i]!='\0';i++) 17: { 18: printf("%c",arr[i]); 19: 20: } 21: printf(" \t\t2) TEXT B"); 22: return; 23: } 24: 25: void turning() 26: { 27: int i; 28: char arr[M]={"1) A."}; 29: for(i=0;arr[i]!='\0';i++) 30: { 31: printf("%c",arr[i]); 32: } 33: printf(" \t\t 2) TEXT C"); 34: return; 35: } 36: 37: void turning2() 38: { 39: int i; 40: char arr[M]={"1) G."}; 41: for(i=0;arr[i]!='\0';i++) 42: { 43: printf("%c",arr[i]); 44: } 45: printf(" \t\t\t2) Text D"); 46: } return 47: } 48: 49: void TaperTurningProcess() 50: { 51: char ch=248; 52: printf(" 1) D"); 53: return; 54: } 55: 56: void GroovingProcess() 57: { 58: printf("1) Q"); 59: return; 60: } 61: float getvolume() 62: { 63: float arr[5]={3}; 64: float S; 65: printf(" Q: "); 66: scanf("%f%f",&arr[1],&arr[2]); 67: if(arr[2]<0||arr[2]>arr[1]) 68: { 69: printf("T. "); 70: } 71: arr[3]=(arr[1]-arr[2])/arr[0]; 72: S=arr[3]; 73: return S; 74: 75: } 76: 77: float ANALYSIS() 78: { 79: float S,D,l,C,n,T; 80: float E,Ec,P; 81: float prod; 82: float a,b,c,d,e,f; 83: S=1000; 84: P=1.1; 85: D=25; 86: l=70; 87: C=(Pi*D*S)/1000; 88: n=(C*1000)/(Pi*25); 89: T=l/(0.1*1000); 90: 91: printf(" Input cutting energy: "); 92: scanf("%f",&Ec); 93: 94: E=((Ec+(P*1000*T))*24*60*60)/1000; 95: prod=1/T; 96: 97: if(E<201){ 98: a=200*0.218; 99: printf("A: RM%.2f",a); 100: } 101: else if(E<301){ 102: b=200*0.218; 103: c=(E-200)*0.334; 104: printf("A: RM%.2f",c); 105: } 106: else if (E>300){ 107: d=200*0.218; 108: e=100*0.334; 109: f=(E-300)*0.516; 110: printf(" A: Rm%.2f ",d+e+f); 111: } 112: printf(":%.2fmin",T); 113: printf(" p:%.2fkWh\t",E); 114: printf(" E:%.1f",prod); 115: } 116: 117: int main() 118: { 119: float S; 120: int feedback; 121: print(); 122: printf(" Q:\t"); 123: facing(); 124: printf(" A: "); 125: turning(); 126: printf(" Q: "); 127: turning2(); 128: printf(" q: "); 129: TaperTurningProcess(); 130: printf(" Q: "); 131: GroovingProcess(); 132: printf(" A "); 133: S=getvolume(); 134: ANALYSIS(); 135: printf(" A=%fm^3",S); 136: printf(" Do you satisfy? If yes, please enter 1, if no enter 0. " 137: scanf("%d",&feedback); 138: if(feedback==1) 139: { 140: printf(" A!"); 141: } 142: else 143: { 144: printf("B!"); 145: } 146: 147: return 0; 148: }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions