print (10**2//-3). a) -20 b) 33 c)-33 d)-34
Q: the out put of the following is #include using namespace std; int main() { int a= 2, b=5,c=e; C+= a…
A: #include <iostream> using namespace std; int main(){ int a=2, b=5, c=0; c+= a*b++;…
Q: int i=1; while(i<=5) { ++i; if(i==4) continue; cout<<i<<" "; } 1.
A: This is a c programming language
Q: Identify and fix errors in the following code: #include using namespace std; int main() for (int i…
A: we have 2 errors in the program and are as follows: j is not declared before it use then is not a…
Q: plete the whole code a..
A: The code is below:
Q: 3) #include using namespace std; int main() { char *ptr; char Str[] = "abcdefg"; ptr = Str; ptr +=…
A: A pointer is a special variable that can hold the address of another variable. An array name refers…
Q: 1 #include 2 using namespace std; int main() 3 4 { 5 int const k=12; 6 int m=67, v=k+m; 7 K=K+2; 8…
A: const: It is a keyword used in c++ to declare a variable as constant means that we can not change it…
Q: using namespace std; int main) int find[) = [1, 2, 3, 4); int "p = (find + 1); %3D cout << *find +…
A: The output is option second which is 10.
Q: #include void main() { int i,x; cout> x;
A: Given :
Q: 1 #include using namespace std; 4 5 typedef char box[4][8]; 7 int main() { box b[3][2]; cout<<sizeof…
A: OUTPUT:
Q: the out put of the following is * #include using namespace std; int main() { int a= 2, b=5,c=e; C+=…
A: Lets Dry Run a = 2 , b = 5 , c = 0; c += a * b++; c += 2*5;(b++ is a post increment ) Final Value…
Q: (a) #include using namespace std; int main() { } for (int i = 0; i <=30; cout << i*2 << endl; }…
A: In the given code: The loop will start from i=0 For i = 0 it will print 0*2 = 0 Now i has to be…
Q: for i=1:4 for j=1:4 a=5; a=a+5; end end
A:
Q: //DETERMINE THE RESULT OF THE FOLLOWI #include using namespace std; int main() { int i,prod=1; i=5;…
A: According to the information given:- We have to execute and find out the correct option.
Q: How many times are the following loop bodies repeated? What is the printout of each loop?
A: Given: How many times are the following loop bodies repeated? What is the printout of each loop?
Q: * TRUE OR FALSE FALSE TRUE for (int i = 0; i<5; i--) std::cout<< ; Bill[i]<<endl We can use the…
A: Q1. True Q2. False Q3.True Q4.True Q5.True
Q: The Monte Carlo method is used in modeling a wide-range of physical systems at the forefront of…
A: Program: //include the required header files #include <iostream> #include <cstdlib>…
Q: Q1 (B):- By using array named STD. Write a program in C++ LANGUAGE to calculate student appreciation…
A: The array is declared as std[n] int type variable and n is the number of marks. Read the student…
Q: c
A: Error: The variable i is not declared. Nature: The variable i is used in for loop but never been…
Q: 5) #include using namespace std; int main() { int arr[] = { 4, 5, 6, 7 }; int* p = (arr + 1); cout…
A: code: //include the necessary header #include<iostream> using namespace std; //main method int…
Q: #include using namespace std; int main () int a, b, C; a = 2; b = 7; (a > b) ? a : b; cout << c;…
A: - We need to get the output of the code provided. - The code provided :: #include <iostream>…
Q: 6.57 (Computer-Assisted Instruction) The use of computers in education is referred to as…
A: Actually, c++ is a powerful general purpose language.
Q: #include using namespace std; int f();
A: Subject:CPP #include <iostream> using namespace std; int f(); int main() {int i, select;…
Q: { int i= 10; While (i< 50) { cout <<i; i+ = 5 ; }
A: Answer : Given program is in c++ and it start from a variable i = 10 . and it will goes till 49 less…
Q: int a=6; int s-%3; while(a>10) S=s+a; cout<<"a="<<a<<endl; a+=23; cout<<"a="<<a; A) a=8 b=6 B. a=6…
A: Given : int a=6; int s=0; while(a>10) { s=s+a; cout<<"a="…
Q: #include using namespace std3; int main() { inti,j,n;
A: Program #include <iostream>using namespace std;int main() { int i,j,n;…
Q: Q31 Write a C++ simple code to read a student name and grade for two student (Using Structure), then…
A: Answer in step2
Q: 3) The number of errors in the following code is .. #include using namespace std; int main) int a,…
A: Answer: The correct option of the code is (d) = 0 Code: #include <iostream>using namespace…
Q: 4 using namespace std; 6 int main() 7 { cout » euro; 14 cout « endl; 15 // Prompt user and read in a…
A: #include<string>using namespace std; int main(){ cout<<"Dollar to Euro Currency…
Q: #include #include using namespace std; int main() { int x=4; for (int x =0; x++<10; x++) cout<<x;}|…
A: Here x will increment two times as x++ with comparison to 10 and after each execution of the loop…
Q: 5. Identify and fix the errors in the following cod 1 #include using namespace std; 3 int Main() 5日…
A: Here in this question we have given a c++ code fragment.and we have asked to find error in it.and…
Q: Lab05-09. What happ #include using namespace std; int main () int value = 30; if (value > 20) throw…
A: #include <iostream>using namespace std;int main (){int value = 30;if (value > 20) throw…
Q: #include using namespace std; int main() {char names [18][8]={"saif", "4", "8", "hussain", "5","2",…
A: In the given c++ program
Q: 4.4 Increment/decrement, Arithmetic, Relational and Assigment Operators #include using namespace…
A: In 4.4, we are printing a,b,c,d,e,f,m and n values after performing all the operations. In 4.5, we…
Q: 3 5 6 7 10 11 12 13 14 15 #include using namespace std: Bint main() cout<<"This is the first…
A: First, compile the program in the c++ compiler And header file is wrong
Q: b) All reserved from in C++ consists of .. letters.
A: All reserved from in C++ consists of ........ letters.
Q: 4- What is the output of the following segment c++ codes: A- #include using namespace std; int main…
A: THE OUTPUT OF THE GIVEN PROGRAMS ARE
Q: 17.54 PRACTICE: Functions***: Output guitar tabs C++ An earlier problem introduced guitar tabs. In…
A: Actually, program is a executable software that runs on a computer.
Q: int i 0; = while (i < 10) { cout << i << endl; i=i+2; }
A: I HAVE PROVIDED SOLUTION IN STEP2
Q: (Replace strings) Write the following function that replaces the occurrence of a substring…
A: Program code: //include the header files#include <iostream>#include <string.h>using…
Q: nain.cpp #include 2 using namespace std; 1 3 4 int main() 5- { int a,b; cin>>a>>b; int i = a; int…
A: The problem is based on the basics of C++ programming language. Note: The program is missing the…
Q: j++; } while (i>-5); printf("%d and %d", i, j); return 0;
A: Answer:
Q: =i :in below code ;int i = 0 for (i = 0;i == 0;i++) } ;cout<<i {
A: Given:
Q: a. 40 15 #include using namespace std; b. 50 15 40 30 int main () C. d. 50 30 int arr(4]…
A: Q1. arr [4][3] is a 2 dimensional array of 4 rows and 3 columns. int * a is a pointer pointing to…
Q: #include using namespace std; int main () { const int x =2; x = 5; cout <<x <<endl; return 0;
A: Here we define a constant variable x const int x=2; here const keyword is used to define constant…
Q: #include void main () { int a=5,b=10,c=1; if (a && b>c){ printf("cquestionbank") ; else{ break; } }
A: The keyword break is not a part of the if-else statement's syntactical form. As a consequence, the…
Q: Suppose you entered New York when running the following programs. What would be the printout?
A: Given:-
Q: 1) (XX Score) A = (1,2,3,4,5,6,7,8,9) of all 3-digit numbers that can be written using the elements…
A: #include<stdio.h> #include<string.h> int main() { int a[] =…
Q: #include using namespace std; main() int a =5; int *p = &a; cout<<p<<endl; cout<<++*p<<endl;…
A: int main() { int a=5; int *p=&a; cout<<p<<endl; //address of a…
Q: Find and correct errors in the following code: i. #include using namespace std; int main() {…
A: In given code, there is only one error. Variable ' i ' is not declared in this code but it is used.…
print (10**2//-3).
a) -20
b) 33
c)-33
d)-34
Step by step
Solved in 2 steps
- Complete C++ source code for Write a complete C++ program to help the manufacturer determine the greatest profit obtainfrom making tables and chairs with a given number of M type A and N type B wood blocks.• The program should prompt the user to input M and N.• Then tabulates all the combinations of tables and chairs possibly made, and calculatesthe profit obtain using array.• The program should also identify the greatest profit and make a concluding remark.• The program should be written in modular form with the main() function calling otherfunctions. If arrays are involved in the function, the arrays should be passed into thefunction as parameters.• Lastly, display the output to an external .txt file.code in C#. please code in simplest way.Language C++ It has been observed by management that some faculty member at the university demonstrates a lackadaisical attitude toward teaching. They seldom go to class yet at the end of each month they receive full salary. Management has decided that GHs 200, 300, 400, and 500 will be deducted from a faculty’s salary if he/she offends once, twice, third time and forth time respectively in a month. This means that if a faculty member offends once in a month GHs 200 will be deducted, if a faculty member offends twice in a month, GHs 500 (i.e. 200+300) will be deducted, if a faculty member offends three times in a month GHs 900 (i.e. 200+300+400), will be deducted and if a faculty member offends four times in a month GHs 1,400 (i.e. 200+300+400+500). Assuming all faculty members are on a flat salary rate of GHs 2000. a. Write a program to request for the names of four faculty members and number times he/she has absented him/herself from class. One of them should have absented…
- I’m using code blocks C++Identif the data type of x after the statment executes: x = 7 // 2 + 3 int float str7. DTA STRUCTURE AND ALGORITHM You have given a n pair of brackets. Your task is to find the number of ways that you can put those brackets in such a way that they will be always balanced.( A balanced pair is that if there are opening brackets there will always a closing brackets for them). Your code must be optimised. Programing language: Java..
- *C Language The greatest common divisor of integers x and y is the largest integer that divides both x and y. Write a recursive function GCD that returns the greatest common divisor of x and y. The GCD of x and y is defined as follows: If y is equal to zero, then GCD(x, y) is x; otherwise GCD(x, y) is GCD(y, x % y) where % is the remainder operator.Topic: Functions Write a functional program that sorts 10 input integers (signed) using either bubble sort or selection sort algorithm. The output window must show both unsorted array of integers and sorted array of integers w/ instruction1) (XX Score) A = (1,2,3,4,5,6,7,8,9) of all 3-digit numbers that can be written using the elements of the set The ones digit is BIGGER than the tens digit and the tens digit than the hundreds wanted. i) Comparison statement for C program that prints ALL 3-digit numbers meeting these criteria (IF etc.) write without using. Some of these numbers are (123, ..., 246, ..., 357, ..., 456, ..., 579, ..., 678, ..., 789) ii) Find out how many 3-digit numbers your program will print on the screen ?
- Computer Science code in c++ please .Do NOT use ANY string/character manipulation or arithmetic functions to implement your solution. You may assume that the input to this encryption function is always exactly 16 bits long. Test that input 0xADE1 yields ciphertext (188, 153). You may hard-code these values for testing.C++ PROGRAMProblem Statement: A 4th grader is having trouble with Permutation and Combination problem in Mathematics, so a friend offered help to create a program they can use. The program contains 3 options, 1st option is for Permutation, 2nd option is Combination and 3rd is for terminating the system. For option 1, Permutation, they uses the following formula: nPr = ; where r must not be greater than n. It should not proceed if this condition is not met. For 2nd option, Combination, they uses the formula : nCr = ; where r must not be greater than n as well. For the 3rd option, the program owner’s information shall be displayed, like name, subject code and account number, before the program terminates. Requirements: Develop the required system and use cpp for the file name Remember that both n and r are variables, their values shall only be entered at run time. The program requires the use of any looping The program requires the use of any conditional Introduce at…C Program Pass-by-reference in Functions Using Pointers Write a function swap that swaps the values of three integers x,y, and z. x is swapped to y, then y to z, and lastly z to x. In the main function, write a program that ask for theee integer inputs and pass in the reference of those variables by calling swap function. more details below the photo.