Question
Hello, I need some proofreading my CCSC complier code. I know a bit of C but I'm currently trying to learn CCSC, below is my
Hello, I need some proofreading my CCSC complier code. I know a bit of C but I'm currently trying to learn CCSC, below is my code. thank you for your time. CCS C is a compiler for the code language Embedded C, it has many differences from other c codes. the problem im having is im not very good at proof reading in embedded c yet and need help fixing the errors.
#include #include #include #include struct distance { int feet: float inch; } dist1, dist2,sum; void main(void) { cout<<"1st distance "; cout<<"Enter Feet:"; cin>>dist1.feet; cout<<"enter inch"; cin>>dist1.inch;
cout<<"2nd distance "; cout<<"Enter Feet:"; cin>>dist2.feet; cout<<"enter inch"; cin>>dist2.inch; sum.feet = dist1.feet + dist2.feet; sum.inch = dist1.inch + dist2.inch; if(sum.inch> 12) { ++sum.feet; sum.inch = sum.inch - 12; } cout<<"sum of distances = " < return 0; }
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