After following statements have executed, what will be appear on the output window int i=10, a=0; while(i>3){ a=a+i*i; i=i-2; cout<
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: The given c program is to calculate the change. This program prompts the user to enter the value…
Q: #include using namespace std; int main(){ int a,b,c; cout > a >> b >> c; //Taking…
A: This code snippet is a simple C++ program that takes three integers as input and determines and…
Q: int i=1; while(i<=5) { ++i; if(i==4) continue; cout<<i<<" "; } 1.
A: This is a c programming language
Q: #include <stdio.h>#include <stdlib.h> //declaring variables globally to calculate…
A: Test cases: Test cases are the conditions or variables which must be tested to determine whether…
Q: int G=12; void Test(int& c) { c=c+5; ++G; cout<<c<< " "<<C int main() { int x=5,G=8; cout<<x<<" "<<G…
A: Q
Q: #include <stdio.h>int main(){int d;int s[20],i, j, p, lg=0,m,t=0;char c;printf("Enter number…
A: The function getch() defines under <conio.h> header file, include <conio.h> header file…
Q: Find the output = int a = 10; do{cout 20) { break; }} while ( a < 20 )
A: 1 2 3 4 5 6 int a = 10; do { cout << "value of a:"<<a<<endl; a = a*1;…
Q: #include <stdio.h>int main(){int d;int s[20],i, r, p, lg=0,m;char c;printf("Enter number of…
A: Add the statement “i+1” in the print statement: printf("salesman %d ",i+1); Add another array to…
Q: Void Do1 (int: &, a. int &b) { a = 5; a = a + b; b = a + 2; } Int main() {…
A: We have given a C++ code and in which pass variable by reference. Here, integer variable x pass by…
Q: # include void main() { float charge; cout >number_day; if(number_day>0&&<=7) charge =…
A: After going through the given program, following points are understood : 1. The program calculates…
Q: int i,j; for(i=1;ii;--j) cout<<"-"; } **_* ** **. ***.
A: CODE WITH OUTPUT:-
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: The algorithm to calculate the amount of change returned is given below: - Algorithm: - Step1:…
Q: thedW.d What will the following code display? void showDub (int); 5. int main () int x = 2; cout « x…
A: Step 1:- Given:- void showDub(int);int main(){ int x=2; cout<<x<<endl;…
Q: max = value2; %3D int main () int max = 03; %3D maxValue (1, 2, тах); cout << "max is " << max <<…
A:
Q: #include int a=5; int main() { int x; x = ~a+a&a+a<<a; printf("%d",x); return 0; } Give output…
A:
Q: int x; x=-2; do { x++; cout0); cout<<"done";
A: This is a while statement code
Q: // P41.cpp - A simple elevator for 4 floors and a basement with a // close door button and 5 keys…
A: #include<iostream> #include<cmath> using namespace std; void close_door(); int…
Q: Int x,y,z ; X=y=z=0 X= ++y + ++z3; Cout<<x; X =y++ + z++; cout <<x;
A: According to the question below the output i am using endl in cout for next line Output:
Q: using namespace std; int main () { int x = 3; if (!x) if (x = 4) cout << "AAA"; else cout << "BBB";…
A: Code is given:
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: What works: Input works if it is in the range of 5 and 95 included 5 and 95. Input works if it is…
Q: Q1// find o/p of the program? #include main () { Int x,y,Z; X=4 ; Y=5; Z= x++ * y;…
A: For Z=x++ * y; Here x value assigned first then increment Therefore Z=4*5=20 Output is x=5 Z=20
Q: 5- What is the output for y? int y = 0; for (int i = 0; i< 10; ++i) y += i; cout << y;
A: The addition assignment operator (+=) : In the addition assignment, the right side operand value is…
Q: #include using namespace std; int main() { int i = 1; i = i - 1; while (i) { cout << "its a while…
A: Given:
Q: Rest of code in image / This is a bad programming style since it is using goto. // This is an…
A: The ask is to make the given program menu-driven with the different functions and errors resolved.
Q: Determine all the output from the following program as it would a screen. void func1(int); void…
A: I have provided output in step2.
Q: int a=10, b=15; test (b,a); test (a,b); cout<<a <<b<<endl; int test (int &x, int y) { x=66; y=44;}
A: Here &x denotes that first parameter is passed as reference and y means its passed by value. In…
Q: #include using namespace std; int main() { int i = 0; int times = i + 1; for (; i < 3; i++) cout <<…
A: We are given the below c++ code. #include <iostream> using namespace std; int main() { int…
Q: Find the output = int a = 10; do { if( a == 15) { a = a + 1; Continue; } cout << "value of a: " << a…
A: Answer: Here are error in program , you write a good code but some small error are there. like you…
Q: change while to do #include <iostream>using namespace std;int main(){int…
A: Code after changing "while" to "do...while": //include the required header files #include…
Q: #include<stdio.h>#include<stdlib.h> int cent50=0;int cent20=0;int cent10=0;int cent05=0;…
A: All program starts with the main() function, so starting with the main(). Since the amount is an…
- After following statements have executed, what will be appear on the output window
int i=10, a=0;
while(i>3){
a=a+i*i;
i=i-2;
cout<<a<<endl;
}
Please find the answer below :
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- PLEASE HELP ME! ? Maximize and use alternative method to this code! package com.btech.pf101; import java.io.bufferedreader; import java.io.inputstreamreader; import java.util.calendar; import java.util.date; public class pawnshopcode { private static final bufferedreader br = new bufferedreader(new inputstreamreader(system.in)); private static string name; private static int age; private static string address; private static string contactno; private static int itemtype; private static string itemtypename; private static final int itemtype_gagdet = 1; private static final int itemtype_jewelry = 2; private static final int itemtype_musicinstrument = 3; private static final int itemtype_homeequipment = 4; private static final int itemtype_landtitle = 5; private static string itemdescription; private static int periodtype; private static string periodtypename; private static final int periodtype_days = 1; private…int func(int a, int b) { return (aA destructor function is called automatically when the object goes out of scope: I. the function ends II. the program ends III. a block containing local variables ends A. I , II, III B. I, II, C. Only II D. I , IIIint a = 10, b =7; System.out.println(a>b?a:b); Will always print what?while (*psz_2 != 0) {;u8_c = *psz_2;;if (u8_c > 0x2F) {;*psz_1 = u8_c | 0x20;;} else {;*psz_1 = u8_c;;}Analyze the following code: int x = 0;int y = ((x < 100) && (x > 0)) ? 1: -1; The code has syntax error. y becomes 1 after the code is executed. y becomes -1 after the code is executed. The code has run time error.A destructor function is called automatically when the object goes out of scope: I. the function ends II. the program ends III. a block containing local variables endsWrite a function to display a pattern as follows: **************** ************** ************... *The function header is void displayPattern(int n)Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age and a character value for its gender. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter. In the main(), there are two Persons already created: one Male Person and one Female Person. Your task is to first ask the user for the age of the Male Person and the age of the Female Person. Then, define and declare a function called createKidPerson() which has the following definition: Return type - Person Name - createKidPerson Parameters Person father - the father of the kid to be created Person mother - the mother of the kid to be created Description - creates a new Person and returns this. The age of this Person will be set to 1 while its gender will be set based on the rules mentioned above. Finally, create a new Person and call this createKidPerson() in the main and then pass this newly…In C++ QUESTION 14 class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Write the function definition for the function perimeterStatic Variable: a variable whose lifetime is the lifetime of the program (static int x;) Dynamic Variable: It is a pointer to a variable (int *x;) Is this comparison true?float f = 12.5F; int i = (int)f; System.out.println("f is " + f); System.out.println("i is " + i);SEE MORE QUESTIONS