
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
![Q3: What the output of the following program:
static void Main(string[] args)
{
>
int i =3 m = 20, n = 3, s = 9, h = 3, k = 2;
while (i <= m)
{
Console.WriteLine(">>>>");
if (i >= n && i <= s)
{
int j i - h;
while (j <= i + k)
Console.Write("<{0}=>{1}>:{2}", i, j++,i*j);
}
i += 3;
Console.ReadLine();](https://content.bartleby.com/qna-images/question/9a47bfae-de2f-41e2-8970-66e015b4e03c/1b7b12ed-bec2-4de8-8773-a795808c021d/nfj60dh_thumbnail.jpeg)
Transcribed Image Text:Q3: What the output of the following program:
static void Main(string[] args)
{
>
int i =3 m = 20, n = 3, s = 9, h = 3, k = 2;
while (i <= m)
{
Console.WriteLine(">>>>");
if (i >= n && i <= s)
{
int j i - h;
while (j <= i + k)
Console.Write("<{0}=>{1}>:{2}", i, j++,i*j);
}
i += 3;
Console.ReadLine();
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 4 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- void fun(int i) { do { if (i % 2 != 0) cout =1); cout << endl; } int main() { int i = 1; while (i <= 8) { fun(i); it; } cout <arrow_forward#include<bits/stdc++.h>using namespace std;bool isPalindrome(string &s){ int start=0; int end=s.length()-1; while(start<=end) { if(s[start]!=s[end]) { return false; } start++; end--; } return true;}int main(){ string s; cout<<"ENTER STRING:"; getline(cin,s); int n=s.length(); bool flag=true; for(int i=1;i<n;i++) { string lowerHalf=s.substr(0,i); string upperHalf=s.substr(i,n-i); if(isPalindrome(lowerHalf) && isPalindrome(upperHalf)) { flag=false; cout<<"String A is:"<<lowerHalf<<"\n"; cout<<"String B is:"<<upperHalf<<"\n"; break; } } if(flag) { cout<<"NO\n"; } return 0;} change to stdio.h string.harrow_forwardInstructions: Kindly provide comments that explains the program code below. (NOTE: this is a C program language) #include <stdio.h> int fact_recur(int n){if(n==0) return(1);return(n*fact_recur(n-1));} int fact_for(int n){ int fact=1; for(int i=1;i<=n;i++){ fact=fact*i; return fact; } }int main(void) { int number; printf("input number is: "); scanf("%d",&number); printf("factorial using for loop: %d",fact_recur(number)); printf("\nfactorial using recursion: %d",fact_recur(number)); return 0;}arrow_forwardZybooks C++ 1.7 LAB: Introduction to data structures labs Step 1: Producing correct output Three commented-out lines of code exist in main(). Uncomment the lines and click the "Run program" button. Verify that the program's output is: 2 + 2 = 4 Unknown function: PrintPlus2 Secret string: "abc" Submit your code for grading. Your submission will pass the "Compare output" test only, achieving 1 of the possible 10 points. Step 2: Inspecting the LabPrinter class Inspect the LabPrinter class implemented in the LabPrinter.h file. Access LabPrinter.h by clicking on the orange arrow next to main.cpp at the top of the coding window. Member functions Print2Plus2() and PrintSecret() print strings using std::cout. Step 3: Implementing CallFunctionNamed() Remove the three uncommented lines from main(). Then implement the CallFunctionNamed() function in main.cpp to handle three cases: If functionName is "Print2Plus2", call printer's Print2Plus2() member function. If functionName is "PrintSecret",…arrow_forwardQ1: 1. What is the output of this C code? void main(){ int a = 0, i = 0, b; for (i=0;i< 5; i++){ a++;continue; } cout<<"i="<arrow_forwardê #include using namespace std; int main() { int count = 5; int num = 2; while (count r && num ){ cout << count << " " << num << endl; count -=1; if (count % 2 == 0) num -=1; } return 0; Output: 52 4 1 3 1 20 10arrow_forwardarrow_back_iosarrow_forward_iosRecommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSONC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education