This code should exit in 0 is inputed or the code should repeat adding two number if '1' is inputed. What are three logical or/and syntax errors in this code?

Error 1: Line 1 should end with semi colon ; instead of colon : Error 2: Line 11 should end with semi colon ; Error 3: Line 12 should also end with semi colon ;
This code should exit in 0 is inputed or the code should repeat adding two number...
Convert the below C code to basic MIPS. The result of this code should ask for two numbers to be inputed and give the answer. For example if 3 and 5 are inputed then the final answer should be as follows: 3&5=1, 3|5=7, 3^5=6, << = 12&20, >> = 0&1, and finally ~ = -4&-6. Please run the code yourself before you upload it to make sure it works. Start the code with .data. Thank you so much. #include <stdio.h>...
Do you have a flowgorithim flow chart for this code? #include <stdio.h> int main() { int num,i=0,sum=0; float average; int customerNumbers[num]; int customerSales[num]; printf("How many customers do you want to track?\n"); scanf("%d",&num); while(i<num) { printf("Enter the customer number. "); scanf("%d",&customerNumbers[i]); printf("Enter the sales for the customer "); scanf("%d",&customerSales[i]); i++; } printf("Sales for the Customer"); printf("\nCustomer Customer"); printf("\nNumber Sales"); for(i=0;i<num;i++) { printf("\n %d \t %d",customerNumbers[i], customerSales[i]); sum=sum+customerSales[i]; } average=(int)sum/num; printf("\n Total sales are $%d",sum); printf("\n Average sales are $%.2f",average); printf("\n --------------------------------------------");...
Hello, I need help with the following C code. This program asks the user to enter three numbers and outputs the sum on the screen , all im trying to do is have the program reprompt the user for a number if anything other than a number is entered for each of the entries. I wanted to use do while for each of the functions but that did not work for example: Enter Number 1: 2 Enter Number 2: Hello...
C program help: Write a C program that uses three functions to perform the following tasks: – The first function should read the price of an item sold at a grocery store together with the quantity from the user and return all the values to main(). example: #include void getInput(int *pNum1, int *pNum2); // note: *pNum1 & *pNum2 are pointers to ints int main () { int numDucks,numCats; getInput(&numDucks, &numCats); // passing addresses of num1 & num2 to...
Fix the code. Use Valgrind to compile below code with no warning and no memory error. Also give a comment about how you fix the code. gcc -std=c99 -pedantic -Wall -Wextra -ftrapv -ggdb3 $* -o question5 question5.c && ./question5 gcc -std=c99 -pedantic -Wall -Wextra -ftrapv -ggdb3 -fsanitize=address -o question5 question5.c && ./question5 Both of these should get the same output . For example if we input 65535 4 3 2 1 it should give us a output with What is...
The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. // DebugFive2.java // Decides if two numbers are evenly divisible import java.util.Scanner; public class DebugFive2 { public static void main(String args[]) { int num; int num2; Scanner input = new Scanner(System.in); System.out.print("Enter a number "); num = input.nextInteger() System.out.print("Enter another number ");...
i need flowchart for the following c code #include <stdio.h> int main() { int n, i, sum = 0; printf("Enter an integer: "); scanf("%d",&n); i = 1; while ( i <=n ) { sum += i; ++i; } printf("Sum = %d",sum); return 0; }
Explain the following code, line by line. As well as the is going on over all. #include <stdio.h> int main() { int a[30]; int i,j,lasti; int num; lasti=0; // scanf the number scanf("%d",&a[0]); while (1) { // sacnf the new number printf("Enter another Number \n"); scanf("%d",&num); for(i=0;i<=lasti;i=i+1) { printf("%d \n",a[i]); // we check if the num that we eneterd is greter than i if(a[i] > num) { for(j=lasti; j>= i;j--) { a[j+1]=a[j]; } a[i]=num; lasti++; break; } }...
Digit to WordsWrite a C program that asks the user for a two-digit number, then prints the English wordfor the number. Your program should loop until the user wants to quit.Example:Enter a two-digit number: 45You entered the number forty-five.Hint: Break the number into two digits. Use one switch statement to print the word for the firstdigit (“twenty,” “thirty,” and so forth). Use a second switch statement to print the word for thesecond digit. Don’t forget that the numbers between 11...
" Number Guessing Game You should think of a number between 1 and 100. Then, over and over again, the computer can suggest an answer. Your response to the computer guess will be as following: If that answer is too small, you enter the character '>'. If the computer's answer is too large, you enter the character '<'. If the computer's answer is just right, you enter '=' Requirements: Your code should show the number of time the computer needed...