Hello can you please help me figure out what i did wrong?
Q: Why won't this code run in C++? #include #include void main() { int A,B,i,sum=0; cout>A>>B;…
A: Explanation: The “include” is a statement that includes a header file called “standard library” in a…
Q: 1. Write a readEmployee function that takes a pointer to an employee struct and fills in the…
A: #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int…
Q: PJ 2 is to write a C+ program to compute mortgage payment for a given loan amount, annual interest…
A: The amount and rate of interest and monthly payment is displayed with 2 point precision getpayment…
Q: Although it will no longer be used, please leave the earlier global variable with the initialized…
A: Clarification:-Here I have made the capacity named readEmployee(), inside the capacity I have taken…
Q: the final value of "total" of the following code is : #include int main (void) { int a…
A: Let us see the answer below with detailed explanation,
Q: I keep getting these errors when I run the code below: Code is in C++ ____animal.cpp_______…
A: Answer: horsemain.cpp: #include "horse.h"#include<limits>#include<cstdlib> void…
Q: Q2: Write a JavaScript function that accepts a number from a user as input and checks if the number…
A: I give the code in javascript along with output and code screenshots
Q: Mortgage bond L, interest rate r =15%. The fixed payments P to pay off the loan over N years is…
A: Given that, For a Mortgage bond L, Interest rate r = 15% Fixed payment…
Q: Although it will no longer be used, please leave the earlier global variable with the initialized…
A: Here I have created a function named readEmployee(). In this function, I have taken input from the…
Q: What is wrong with the following programs(one problem each)? nclude ing namespace std; t main() {…
A: Solution :
Q: Please edit my code thankyou to the given picture #include int main() { char ch; double…
A: used switch statement for this coding also used do while loop for the repetition of switch…
Q: Although it will no longer be used, please leave the earlier global variable with the initialized…
A: Memory Layout of C Programs A typical memory representation of a C program consists of the…
Q: I'm getting an error message where the FindText() is returning 0 instead of the proper amount of…
A: Coded in C++.
Q: #include #include double f(double x){ return x*x; } double reimannSums(double…
A: NOTE: - The program is working based on sample values. These values are: - COMMAND LINE ARGUMENT: -…
Q: how can I add one feature of "Total sale amount "in the daily report"
A: Please someone help me based the program given ,how can I add one feature of "Total sale amount "in…
Q: /I need help debugging the C code below the image is what I was following for directions while doing…
A: The Above Code is Debug Success full:
Q: ?What is the output of the following code segment int random [3] [4] = $\{\{6,7,3,1\},\ (4,8,2\},…
A: Task : Given the latex code. The task is to convert the latex code into the equivalent programing…
Q: 5. Given variables int areaBound and int sum, write a snippet of code that assigns to sum the result…
A: Given:
Q: I'm having trouble in making the Avg in my C++ program work. #include #include using namespace…
A: In this question, i have done some correction to find out the correct average and highest grade…
Q: Put this code into functions and make my game continuous so the player can be asked to pay again if…
A: Here our task is to run this game again and again based on the approval of user. An easy way to…
Q: 3. Count Even N(from codeChum, modified) 1 #include #include"positive.h" int main(void) { int n =…
A: I give the code in C as per your requirement and also provide the output and code screenshot
Q: Q/ Write a program that finds the sum of the odd numbers and the sum of the even numbers among the…
A: I give the code in Python along with output and code screenshot
Q: he following code isn't working correctly and I am unable to figure out why. The for loop is never…
A: srandom((unsigned)time(NULL) + my_rank);value = random() % 10;if (my_rank % divisor ==…
Q: What will be the contents of sum? in c # include int main(void) {…
A: Introduction of the Program: The C program takes a variable count that starts from 1 and incremented…
Q: EXPLAIN THIS CODE EACH LINE #include #include int main() { char name[20]; int…
A:
Q: what is wrong with this programming? #include #include using namespace std; int main() { string…
A: #include <iostream>#include<bits/stdc++.h>using namespace std;int main(){string…
Q: Three variables, x, y, and z, supposedly hold strings of digits, suitable for converting to…
A: Below is the required python program: - Approach: - Ask the user to enter the value of x, y, and z.…
Q: In python: How do I use a function to covert user input into title case with validating that the…
A: Here, you are asking to use a function to covert user input into title case with validating that the…
Q: Run this code and check if it works if not how would you fix it! n=int(input("Number of rounds of…
A: The given code has some loose ends. It's working but not effectively according to the game. The…
Q: #include 2 #include int main(void) { srand(time(@)); int arr[100]; int sum = 0; 4 6 7 %3D for(int…
A: just see the below code C program convert to RISCV assembly
Q: a. What is wrong in the following code? i. double a = 7.0; int* p = sa; ii. int test = 1; int* pTest…
A: Question 1: In the first code: double a = 7.0; int* p = a; The error in the code is: a has been…
Q: fix my codes!!! #include #include int main() { char name [10][100]; int fc = 0,…
A: Errors in the program: Many variables declared as an integer types. To fix this error:…
Q: I'd like to ask a C programing quesitons. I didnt understand this while loop . Can you explain that…
A: Dennis Ritchie at Bell Labs invented the C language, the successor to the programming language B, in…
Q: What is wrong with the next programming? #include #include using namespace std; int main(){…
A: According to the question below the Solution: Error:
Q: #include int main() { int i=7; do { for(int j=7;j4); return 0;
A: Here, Code is given to tracing.
Q: Examine this code: Date d = makeDate(Month::jul, 4, 1776); Now that you've changed the type of…
A: The code fails not due to makeDate() function, it fails only due to isLeapYear() method generated by…
Q: u modify this code so k only prints even numbers
A: Program explanation: Here, nested for loop is used in the program. The outer loop iterates 2 times…
Q: //I need help debugging the C code below the image is what I was following for directions while…
A: SUMMARY: - Hence, we discussed all the points.
Q: ?What is the output of the following code #include using namespace std; int main(){ int n=3, x=1;…
A: GIVEN:
Q: #include int main() { int i=7; do for(int j=7;j4); return 0;
A: Here, Program is given to tracing.
Q: Fix this code #include int main(void) { printf("unknown person\n"); printf("Greates number…
A: As given, we need to fix the given code. The given code - #include <stdio.h> int…
Q: lef foo (a : Int) { ... var b = a + 3 ... def bar(g : Int) { val h = b + g ... } def jat(...) {…
A: In the function foo, every time in the while foo is called with the value 3 because Val is passed…
Q: What error is in this code? I keep getting this error but can't find how to solve it. 'printValues…
A: According to the question below the solution: After fix the errors Output:
Q: need help debugging the C code below the image is what I was following for directions while doing…
A: // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); //…
Q: def findOccurrences(s, ch): lst = [] for i in range(0, len(s)): if a==s[i]:…
A: According to the question below the complete Code:
Q: Hello. I am having trouble with an assignment. When I run the program, it says: TypeError: can't…
A: Explanation: NumPy may be used to resolve the "Type Error: cannot multiply sequence by a non-int of…
Q: You must submit your own work. For your solutions, only use the concepts taught in this class so…
A: The problem is based on the basics of strings in python programming language.
Q: 3. Complete the function count_digits. This function takes one parameter - a string (s). It should…
A: Note: We are allowed to answer one question at a time, according to the BNED Guidelines. For the…
Q: What is the last value of F after executing the following code? int T=2, F=10; do { while (F =T); O…
A: The "while" loop is a pre-condition check loop that tests the condition of the loop before the…
Hello can you please help me figure out what i did wrong?
print('==> Windchill Temperature (WCT) Weather Report Calculator <==')
precision=int(input('Select decimal precision for the report [1--4]:\n'))
print("Enter name of ** Location 1 **:")
print("\tEnter air temperature [in deg F]:")
print("\tEnter wind velocity [in mph]:")
for i in range(locations):
name=input('Enter name of ** Location %s **: ' % str(i+1))
air_temp=float(input('\tEnter air temperature [in def F]: \n'))
wind_vel=float(input('\tEnter wind velocity [in mph]: \n'))
wct=35.74 + 0.6215 * air_temp -35.75 * (wind_vel ** 0.16) + 0.4275 * air_temp*(wind_vel**0.16)
print('\tWCT is %.*f deg F.' %(precision,wct))
The program has to be properly intended (Use Tab for indentation)
locations has to be defined or accepted from user
We shown it using user acceptable value
Step by step
Solved in 3 steps with 1 images
- be recor #include #include minutes #include limit on int func(int, int, int, int); main(){ srand(time(NULL)); int a, b, c, fNum; printf("Choose three different numbers between 0-39:"); scanf ("%d%d%d", &a, &b, &c); fNum = func (a, b, c, 25); printf("\nThe result: %d", fNum); } int func (int ul, int u2, int u3, int iter){ srand (time (NULL)); int n1=0, i=0, count=0; for (;idef sparechange(quarters, dimes, nickels, pennies): spareAMT = 25 * quarters + 10 * dimes + 5 * nickels + 1 * pennies print("The total value of your change is $%.2f "%(spareAMT/100)) uses import.sys and sys.argv[ ] to run codeWhat value does function Joy return when called with a value of 4?int Joy (int Q){ if (Q <= 1) return 1; else return Q * Joy(Q-1);}Usage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to do a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program. You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the number of monthly payments you’ll make. Fourth, raise the result of 1 plus the monthly rate to the negative power of the number of monthly payments you’ll make. Fifth, subtract that result from 1. Sixth, divide the monthly rate by the result. Last, multiply the result by the amount you want to borrow.…i need help restructuring this code. # Poor Chinese Zodiac Calculatoryear = int(input('Enter a year: '))animal_year = year % 12if animal_year == 0:print(year, 'is the year of the monkey')elif animal_year == 1:print(year, 'is the year of the rooster')elif animal_year == 2:print(year, 'is the year of the dog')elif animal_year == 3:print(year, 'is the year of the pig')elif animal_year == 4:print(year, 'is the year of the rat')elif animal_year == 5:print(year, 'is the year of the ox')elif animal_year == 6:print(year, 'is the year of the tiger')elif animal_year == 7:print(year, 'is the year of the rabbit')elif animal_year == 8:print(year, 'is the year of the dragon')elif animal_year == 9:print(year, 'is the year of the snake')elif animal_year == 10:print(year, 'is the year of the horse')else:print(year, 'is the year of the sheep') this is the starter code ^^^ these are the requirments• There should be a main function, a get_input function, and a get_zodiac_animal function. • The main…In C++ Create an array of random 10 random numbers. Use the "range-based for loop" (sometimes called "enhanced for loop") to put the values into the array (users choice of number) and use the "range-based for loop" to output the numbers to the console.#include <stdio.h>int main(){int d;int s[20],i, r, p, lg=0,m;char c;printf("Enter number of salesman(max 20): ");scanf("%d", &d);for(i=0; i<d; i++){ printf("\n salesman %d sales: ");scanf("%d", &s[i]);}for(i=0; i<d; i++){for(r=i+1; j<d; r++){if(s[i] > s[r]){p= s[i];s[i] = s[r];s[j] = p;}}}printf("\nsalesman lowest to highest: ");for(i=0; i<d; i++){printf("%d\t", s[i]);}for(i=0;i<m;i++){printf("\n highest sales: %d ",lg);if(lg<=s[i])lg=s[i];break;}getch();} >>> the upper part output should be like this enter number of salesman (max 20): 5 salesman 1 500 salesman 2 300 salesman 3 1000 salesman 4 200 salesman 5 1000 in the lower part the lowest to highest the output should become like this salesman 4 200 salesman 2 300 salesman 1 500 salesman 3 1000 salesman 5 1000 highest total sales : 2000Please Python correctly thanks def get_written_date(date_list): """ The function ... """ month_names = { 1: "January", 2: "February", 3: "March", 4: "April", 5: "May", 6: "June", 7: "July", 8: "August", 9: "September", 10: "October", 11: "November", 12: "December", } return month_names[int(date_list[0])]+ " " + str(int(date_list[1])) + ", " + date_list[2] # Finish the function # Return the date string in written format if __name__ == "__main__": print(get_written_date(["01", "02", "2022"])) print(get_written_date(["01", "12", "1970"])) print(get_written_date(["04", "14", "2020"])) print(get_written_date(["06", "19", "2000"])) assert get_written_date(["01", "02", "2022"]) == 'January 2, 2022' assert get_written_date(["01", "12", "1970"]) == 'January 12, 1970' assert get_written_date(["04", "14", "2020"]) == 'April 14, 2020' assert…Ex1: If A=the odd numbers between (1,20), B= the even numbers between (2,20) find (1)A+B, (2)A.B, (3) A', B' ,(4)A'.B' ,(5)A*B, (6)A*B' (7) A'/B' ,(8)A'./B' ,(9)A/B (10)A./BPlease type thank you!#include #include #include int main() { int i, j; printf("Columns | JIn"); for (i = 1; i< 4; ++i) { printf("Outer %6d\n", i); for (j = 0; j< i; ++j) { printf(" Inner%10d\n", j); } } /* heading of outer for loop */ /* heading of inner loop */ %3D return (0); } Create a new code modifying it to use "while loop" instead of the "for loop"draw flow char for this code is easy 2 #include 3- int main() { 4 char c; 5 6 7 8 9 ▾ 10 11 12 13 14 15 16 17 18 19 20 21 22 23 } printf("Enter a character: "); scanf("%c", &c); // Convert Lowercase to uppercase and vice versa if (c >= 'a' && c = 'A' && c <= 'Z') { c = c + 32; // Convert uppercase to Lowercase } 2. Write a C program that ask the user to enter a character then the program will print the input character and the next characters in ascending order up to character 'Z'. (Note: if the user enters lower case character, the program will print lower case character and vice versa) } // Print the character and subsequent characters in ascending order while (c <= 'Z') { printf("%c ", c); C++; 32; // Convert Lowercase to uppercase printf("\n"); return 0; Enter a character: v V W X Y Z inputSEE MORE QUESTIONS