Question: I have the program in C im not sure how to transcribe it here is my c code: #include float voltage,power; void findvoltage(float,float); void findcurrent(float,float);

 I have the program in C im not sure how to

I have the program in C im not sure how to transcribe it

here is my c code:

#include

float voltage,power; void findvoltage(float,float); void findcurrent(float,float);

main() {

float current,resistance;

printf("Enter the current value:");

scanf("%f",&current);

printf("Enter the value of Resistance:");

scanf("%f",&resistance);

findvoltage(current,resistance);

findcurrent(current,voltage);

}

void findvoltage(float current,float resistance) {

voltage=current*resistance;

printf("voltage %f: ",voltage);

}

void findcurrent(float current,float voltage) {

power=current*voltage;

printf("power is %f:",power);

}

2. Write a ARMv8 program that finds voltage drop and power dissipated by a resistance (R) when a current (I) flows through it. Resistance and current values are given as inputs. Create a function that would find the voltage drop, and create another function that would find the power. Use these functions in your program. The input and output values are single precision floating-point values. Assume the input resistance value (R) is in register SO and current (I) is in register S1. Store the computed voltage drop in register S2 and computed power in register S3. Assemble, test, and simulate the assembly code using DS-5 simulator. Do not upload the entire DS-5 project. Only

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!