alx-low_level_programming's People
Forkers
segun-philip fastrack9 chile4coding bauer123 nnamdi97 samzyconcepts lankiman callmesarah 0xdod adelekejames adeolaakee andualem-andy originalgracias ryanmwangi tosam01 teemeelehyin walere swirlboy mensaloveable 0abel0 fayiks abenezer64 oscarcode442 kojowest icollinss samuel77777777 leroy9387 jeyididya o-tero foyem firaolwork wawid1435 darrrone tactical98 maria-daniella bensonmogambi ibroscope89 itsmavo samzeky yeshan111 kai-deux salawekesa thealaoifeoluwa psydology ambhermi den-mwangi brianbkm vincenttommi leule3 abk4747 oscarj-8 web-consult-ng amanfitsum mihretabo franklinrobin lesley366 kolobetso ericniyo73 ikpia chinedu6 kabamory2017 chandem adakel abel047 aisienaisosa jozene udokamma22 derajsp divineux23 boluwat emmanuel130 raph4sure mrbenzeal aahad09 honore8 shadowwalkerfb canhamzacode henrygithub123 benclassic ikenwaa mdahwireng e-mekus obelr theopen4 bonavita35 jnart8 mosabui etoogueji mondayeze jjasore craveempire jattojohn abdulgaffar01 iron952 zelaberh cnwante soud04 rianamoi marshvin joel1aisienalx-low_level_programming's Issues
If you can u do figure this PROGRAMMING Read and understand the following code. 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 ac_dc[] = { 14479, 12574, 54786, 51996, 77903, 16499 };
const static int N = sizeof(ac_dc)/sizeof(*ac_dc);
static void fail(){
puts("Nope!");
exit(EXIT_FAILURE);
}
static void linkin_park(int64_t i, int64_t z, int64_t o){
if ( i - o / 7 + 3 * z / 11 )
fail();
}
static void the_beatles(int n, int64_t u){
int64_t s = u;
for(; n<N; ++n) {
if ((n % 2) == 0)
continue;
s += ac_dc[n];
}
if (s != 159276)
fail();
}
static void metallica(int y, int64_t d){
if (y<N) {
if (y % 2)
metallica(++y, d);
else metallica(y + 1, d * ac_dc[y]);
} else if (d != 197887032)
fail();
}
int main(){
int64_t r, l, h;
printf("Please enter the right three numbers: ");
fflush(stdout);
if (scanf("%" SCNd64 " %" SCNd64 " %" SCNd64, &r, &l, &h) != 3)
fail();
ac_dc[0] = r;
ac_dc[5] = l;
ac_dc[4] = h;
the_beatles(0, 92627);
metallica(1, 3);
linkin_park(r, l, h);
puts("Exactly! Good job.");
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.