1 #include int main() { int i, j, n, row, col; 2 3 4 5 6 printf("Enter row: "); scanf("%d", &row); printf("Enter column: "); scanf("%d", &col); n = 1; i = 1; 7 8 9 10 11 12 13 do{ j = 1; do{ printf("%d 14 15 16 ", n); 17 n++; j+; while i 18 19
Q: Write a program that asks for a password and then verifies that it meets the stated criteria. If it…
A: #include <bits/stdc++.h> using namespace std; void checkpassword(string& password) {…
Q: Requirements: Your program must be done in Java; Your program must contain programmer comments…
A: The Java programming language is an object oriented language that uses abstraction to place data and…
Q: Your program must be done in Java; Your program must contain programmer comments explaining all…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: BEGINNER C++: Hello, I have the programming assignment below and was wondering if I can get some…
A: Code #include<iostream>using namespace std; const int ROWS=3;const int COLS=3;void…
Q: int main() int i, j; char board[5][5] = { //none of the elements below is a numeric character {'H',…
A: A 2 dimensional array stores elements in tabular format i.e row and column. Here board is 2D array…
Q: int main ()( int number; cin >> number; FindNumber (number, 0, 8); return 0;
A: 1)number =7 highvalue=8 lowvalue=0 midvalue=4 now, midvalue<number so, first z will print then,
Q: Create a LookupNames project using C++. In the main function: Ask the user to enter a number of…
A: Below is the required C++ program: - Approach: - Import the header file and use the namespace.…
Q: Requirements: Your program must be done in Java; Your program must contain programmer comments…
A: Solution:: The Java programming language is an object oriented language that uses abstraction to…
Q: C++ Rewrite and fix only the lines with Syntax (compiler) errors and Runtime errors. // add a…
A: Given code :- printArray(float array[], int size){ for(int k=0; k<size; k++) { cout…
Q: xplain Structures and how this code works: - Imagine you're teaching the material to someone who…
A: Java is one of the languages, which is considerably used in many sectors of Computer. In older…
Q: te a C++ program A record contains name of cricketer, his age, number of test matches that he has…
A: Required: A record contains name of cricketer, his age, number of test matches that he has played…
Q: Obviously that the program has many syntax errors. Rewrite the entire program after correcting…
A: A class is a user-defined data type that combines data members and methods for manipulating that…
Q: the Error Each of the following definitions and program segments has errors. Locate as many as you…
A: Note: Since the question is multiple one we are advised to de only first question. Kindly post other…
Q: #include struct dna { int number; char text; char stringvalue[30]; }; int main() {…
A: NOTE: - As asked the comments are being added on each line of the program. Any modification other…
Q: C Programming Not C++, pls a) Write a main function that declares an array of 10 int’s. Assign each…
A: According to our guidelines, we are allowed to solve only the first sub part of the question. Please…
Q: The array was declared using the int sales[2][5] = {{10000, 12000, %3D 900, 500, 20000}, {350, 600,…
A: C++ code :- #include <iostream> using namespace std; int main() { int…
Q: __________ Arrays where the index is a string value. a. Positive b. None c. Associative d. Numeric
A: Given: __________ Arrays where the index is a string value. a. Positive b. None c.…
Q: 2. An integer variable takes 4 Bytes of memory whereas a char variable takes 1 Byte of memory. You…
A: Write a C++ program to convert the given array of integers into a string in which the first…
Q: Assignment#3 (Bubble Sorting) JAVA Create a program that will ask the user to input 10 numbers.…
A: Coded using Java
Q: The Lo Shu Magic Square The Lo Shu Magic Square is a grid with 3 rows and 3 columns shown below:…
A: #include<iostream>#include <algorithm>using namespace std;// Global constantsconst int…
Q: 2.15 (Geometry: area of a hexagon) Write a program that prompts the user to enter the side of a…
A: Given: To write a python program to find the area of hexagon.
Q: Write C++ statements to do the following: Declare an array to hold 7 floating values.…
A: Given: Write C++ statements to do the following: Declare an array to hold 7 floating values.…
Q: // Program Framelprompts the user to input values representing // the dimensions of a print. The…
A: NOTE: In the given problem we have to just use float data type in place of int so that the program…
Q: Debug the errors found at the program: #include using namespace std; int main { int values =…
A: sequential function searching an array of specified size for a given element and returns the index…
Q: allow data to be continuously input for more customer's information such as customer's name and…
A: I have re-written the code with the input of the customer's name and phone number.…
Q: Create a complete java program called Week_Report. The program must include two array structures, a…
A: The program must include two array structures, a string array called DaysOfWeek and a double array…
Q: n visual basic Print out the last value in a single-dimensional array.
A: logic:- calculate length of array using array.length function use indexing array.length in array…
Q: 10 Multidimensional Arrays 2DArray.cpp, add a header comment, use the pseudocode to create your…
A: Define the const variable Height =4 and Width=5 as integer Declare the two-dimensional array as the…
Q: #include #include Collapse 3 4 void Loop(int n) { int i = n; Exercise 6.1 5- 6 7 while (i > 1)…
A: Value of n and i in sequence of execution: - n i 10 10 10 5 10 6 10 3 10 4 10 2
Q: #include using namespace std; int Compute (int vall, int val2) { int result = 0; %3D int i; for (i…
A: The answer to the given question: This is a c++ program, In this particular program, the main…
Q: Design program performs föllow 1. Read your student number on the command line when you call the…
A: It is defined as a powerful general-purpose programming language. It can be used to develop software…
Q: Create a program capable of reading data from a square array of integers. At the end of the reading,…
A: Here I have created an array containing elements in the form of a square array of size 4x4. Next, I…
Q: Write a program that generates a two-column table showing Fahrenheit temperatures from -40F to 120F…
A: 1. declare variable Celsius initialized with 0.0 2. run loop from 0.0 to 120.0 with increment of 5…
Q: #include using namespace std; int main() (double degree [6] [2] =(30,40, 10, 70, 20, 30, 60, 70,…
A: C++ Program: #include <iostream>using namespace std; int main(){ double…
Q: Debug the errors found at the program (the value must be found at location 2): #include using…
A: Error 1: Put parenthesis () after main and main is funtion Error 2: Put square bracket after values…
Q: Explain the code according to comment line shown below. The Explanation must contain the flows of…
A: For Example i take the values as X=5, Y=6,Z=8 and T=4 #include <stdio.h>//Prototypesvoid…
Q: Arrays are used: Select one: a. When a variable has more than one value. b. When the user does not…
A: Correct answer is Option c. When multiple values of a variable need to be saved in the Computer's…
Q: 1- Define an array of 10 components. 2- Initialize all components to zero. 3- Use suitable…
A: There are many languages which are used in today's wold. Computer language can be described as a…
Q: Your program must be done in Java; Your program must contain programmer comments explaining all…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: Assignment in Java Create a program that will ask the user to input 10 numbers. Display the…
A: Coded using Java.
Q: C# create a program that allows entering a total of 10 names in an array of noms names, then…
A: C# (C-Sharp) is a Microsoft programming language that operates on the.NET Framework. C# is a popular…
Q: void print_stars(): void option_list): void divisors(int n); int summation(int s); int factorial…
A: NOTE: Based on our rules, when multiple questions are posted, we should answer only the first…
Q: Please convert this from Python to C (thank you) def math_game(lv, lmf, lsf, lrf, rv, rmf, rsf,…
A: - We have to implement the python code in c. - We have 8 integers in the function used and the…
Q: Module main() // Local variables Constant Integer SIZE = 7 Declare Integer employee[SIZE] =…
A: Here, we have given the code. We need to convert the given code into a flowchart.
Q: Your program must be done in Java; Your program must contain programmer comments explaining all…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: return midpt; else if (arr[midpt] < value) return else return find(arr,value, left, midpt-1); } void…
A: Given:
Q: Jaimey 85* Jessica 62 Georgia 81 Jaden 85* Program has two arrays, namely, name and mark array.…
A: The ask is to display the name and the associated marks on the console window. Additionally it asks…
Q: Create a calculator program that works like a real calculator. It means that the user could enter as…
A: Program: // C programming#include <stdio.h> // Function to evaluate the sum operationint…
how to fix the problem of my output to the expected output?
Step by step
Solved in 2 steps
- Circle Properties Write a program that prompts for and accepts the diameter of a circle as a floating point number. The program should calculate and output the area and circumference of the circle. A sample run of the program should look like this: Enter circle diameter: 2.5 The area is 4.91 and the circumference is 7.85. Use 3.14159 as your constant for pi. global main ; exposes program entry point to the linkerextern printf ; declare external functionextern scanf section .text ; start of code segment main: push rbp ; preserve base pointer mov rbp,rsp ; copy stack pointer to base pointer pop rbp ; restore base pointer mov rax, 0 ; exit status (0 = success) ret section .data ; start of initialized data segment section .bss ; start of uninitialized data segment section .dataprompt db "Enter circle diameter: ", 0format db "The area is %0.2f and the circumference is %0.2f.", 0pi dq 3.14159…Flowchart for student interface program please. Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final…Le Chef Heureux Restaurant has 20 tables that can be reserved at 5 p.m., 7 p.m., or 9 p.m. Design a program that accepts reservations for specific tables at specific times; the user enters the number of customers, the table number, and the time. Do not allow more than four guests per table or invalid table numbers or times. If an attempt is made to reserve a table already taken, reprompt the user. Continue to accept reservations until the user enters a sentinel value or all slots are filled. Then display all empty tables in each time slot. For this homework assignment you need to: create a flowchart using RAPTOR
- Function Name: comboLock Parameters: num1 – a positive integer representing the first digit in the combination num2 – a positive integer representing the second digit in the combination num3 – a positive integer representing the third digit in the combination num4 – a positive integer representing the fourth digit in the combination num5 – a positive integer representing the fifth digit in the combination Description: You own a combination lock that only opens when presented with the correct sequence of odd and even numbers that are less than 10. Write a function that takes in 5 integers. Check whether they are in this order: odd, even, odd, even, odd. If they are in the correct order and all below 10, then print the string “You opened the lock.” Otherwise, print “You are locked out.” Test Cases: >>>comboLock(9, 2, 5, 4, 1) You opened the lock. >>>comboLock(1, 8, 3, 6, 8) “You are locked out.” comboLock(2, 2, 5, 6, 4) “You are locked out.” >>>comboLock(9, 8,…def area(side1, side2): return side1 * side2s1 = 12s2 = 6 Identify the statements that correctly call the area function. Select ALL that apply. Question options: A print(f'The area is {area(s1,s2)}') B answer = area(s1,s2) C result = area(side1,side2) D area(s1,s2)Le Chef Heureux Restaurant has 20 tables that can be reserved at 5 p.m., 7 p.m., or 9 p.m.Design a program that accepts reservations for specific tables at specific times; the user entersthe number of customers, the table number, and the time. Do not allow more than four guests pertable or invalid table numbers or times. If an attempt is made to reserve a table already taken,reprompt the user. Continue to accept reservations until the user enters a sentinel value or allslots are filled. Then display all empty tables in each time slot. Pseudocode and flowchart (RAPTOR please) if possible. Do not write it in any particular language, that is not required.
- // this is a C programming code please fill out the empty spots from #1 to #24 /*Task 1: Print full name*/ #include<stdio.h> #include<stdbool.h> __1__ scan_name(__2__ size, __3__ name[size]); // function header int main() { int len; bool isDone = false; //default to false since it's not done without running char enter; //this is to avoid the first getChar captures the enter from length //Get name and redo them over and over till the name length is big enough // isDone is our flag to know if we need to run again. // isDone == true means we are done, and vice versa do { printf("\nEnter your full name's length."); printf("Make sure to count spaces and null character:"); scanf("%d%c", &len, &enter); char fullName[len]; isDone = scan_name(len, fullName); }while(!isDone); return 0; } /*Get and print the full name. Return a boolean to check if the length is correct or not. We set the default to be true (assume user counts correctly the size) Similar to task 3, we need to…C-programming. The program is to view a sequence of 30 points of speech data. The display will be shown in 5 columns with 6 data each. Then the program will show the statistic of its average power, average magnitude and how many zero crossings. Zero crossing is the event when the multiplication of two consecutive data result in negative number. /*––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*//* Homework #9 program *//* *//* This program computes average power, average magnitude *//* and zero crossings from a speech signal. */ #include <stdio.h>#include <math.h>#define MAXIMUM 50 int main(void){ /* Declare variables */ int k=0, npts=30; double…// SuperMarket.cpp - This program creates a report that lists weekly hours worked // by employees of a supermarket. The report lists total hours for // each day of one week. // Input: Interactive // Output: Report. #include <iostream> #include <string> using namespace std; int main() { // Declare variables. const string HEAD1 = "WEEKLY HOURS WORKED"; const string DAY_FOOTER = " Day Total "; // Leading spaces in DAY_FOOTER are intentional. const string SENTINEL = "done"; // Named constant for sentinel value. double hoursWorked = 0; // Current record hours. string dayOfWeek; // Current record day of week. double hoursTotal = 0; // Hours total for a day. string prevDay = ""; // Previous day of week. bool notDone = true; // loop control // Print two blank lines. cout << endl << endl; //…
- Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12. This program is invoked from the command line as shown: ./program 5 7 The procedure named what is called from main, and returns to main with the value: Options: a) 11 b) 66Computer Science Part C: Interactive Driver Program Write an interactive driver program that creates a Course object (you can decide the name and roster/waitlist sizes). Then, use a loop to interactively allow the user to add students, drop students, or view the course. Display the result (success/failure) of each add/drop.6/49 Lottery Draw Application (Python Program) I. Create an application that simulates a 6/49 Lottery Draw with the following objectives: 1. The program must have 2 options in its main menu [Draw] - The program will move to asking 6 unique numbers from the user • [Exit) - Application should terminate After displaying the result of the draw, the program must return to main menu 2. The program must ask 6 unique numbers from the user. • The program must only accept numbers between 1-49. The program must check for repetition in numbers inputted by the user • The program must continue asking for 6 unique numbers until the conditions above are satisfied • The accepted numbers must be stored in separate variables 3. The program must generate 6 unique winning numbers o No repetition of generated random number o Generated winning number must be between 1-49 o The winning numbers must be stored in separate variables 4. The program must check for matches between the accepted numbers from the user…