D.  Provide the correct input to have the program print the sentence: Exactly! Good Job. Before submitting your answer, please check its correctness by executing the code. #include #include #include static int64_t linkin_park[] = { 90422, 19518, 39438, 91175, 68488, 80947 }; const static int N = sizeof(linkin_park)/sizeof(*linkin_park); static void fail(){ puts("Nope!"); exit(EXIT_FAILURE); } static void guns_n_roses(int64_t t, int64_t r, int64_t l){ if ( t - l / 7 + 3 * r / 11 ) fail(); } static void anthrax(int q, int64_t y){ if (q

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

D. 

Provide the correct input to have the program print the sentence:

Exactly! Good Job.

Before submitting your answer, please check its correctness by executing the code.

#include <stdio.h>

#include <inttypes.h>

#include <stdlib.h>

static int64_t linkin_park[] = { 90422, 19518, 39438, 91175, 68488, 80947 };

const static int N = sizeof(linkin_park)/sizeof(*linkin_park);

static void fail(){

puts("Nope!");

exit(EXIT_FAILURE);

}

static void guns_n_roses(int64_t t, int64_t r, int64_t l){

if ( t - l / 7 + 3 * r / 11 )

fail();

}

static void anthrax(int q, int64_t y){

if (q<N) {

if ((q % 2) == 0)

anthrax(++q, y);

else anthrax(q + 1, y + linkin_park[q]);

} else if (y != 179290)

fail();

}

static void pink_floyd(int x, int64_t n){

int64_t h = n;

for(; x<N; ++x) {

if (x % 2)

continue;

h *= linkin_park[x];

}

if (h != 241557750)

fail();

}

int main(){

int64_t w, s, a;

printf("Please enter the right three numbers: ");

fflush(stdout);

if (scanf("%" SCNd64 " %" SCNd64 " %" SCNd64, &w, &s, &a) != 3)

fail();

linkin_park[0] = w;

linkin_park[5] = s;

linkin_park[4] = a;

anthrax(0, 67365);

pink_floyd(1, 5);

guns_n_roses(w, s, a);

puts("Exactly! Good job.");

}

 

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education