cbourke / computersciencei Goto Github PK
View Code? Open in Web Editor NEWComputer Science
License: Creative Commons Attribution Share Alike 4.0 International
Computer Science
License: Creative Commons Attribution Share Alike 4.0 International
I read this amazing book's chapter 2 and implemented examples.
I need to check whether my code work correct or not when implementing 2.27th example.
Could you add an output of this example's below.
https://demonstrations.wolfram.com/AreasOfTheLensAndTwoLunesOfTwoIntersectingCircles/
I can share make easier this https://github.com/dzbyr/c_codes here my code for try.
I got A=0.599951 for r=1, d=2.44, R=2.
At least Could you add these result to textbook for check immediately whether correct code or not for time saving.
The GTA specifications on the TALA document (under "General Responsibilities") state "Holding regular office hours (at least 2 per week) in a designated area," while the LA section does not include the hour requirement. Assuming you have a minimum as you did for 156, specifying that in this section could be advantageous for the new LAs
For the sake of labs, in 156, there was confusion on whether or not partial credit was possible between some LAs. I believe this should be clarified in the syllabus to replace "Labs not completed on time may not receive full credit" so as to include an explicit declaration of the possibility of partial points.
Do I oblige to use if condition for chapter 3 examples?
I could answer example 3.3 with while particularly. I don't know how to use "if condition"as a repeating query
BTW, would you prefer questions to be asked GitHub or e-mail?
/**
* Author: Zubeyir
* Date:2021/02/06
* Source: Teacher Chris Bourke's book
* Aim:
* Finding the best gas price!
* Which type of gas is the better deal with respect to price-per-mile driven?
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(int argc, char ** argv){
int i=1,c;
printf("\nHow much gas you want compare:");
scanf("%d",&c);
double ppm[c];// Price per mile
double dist[c];// miles per galon
char name[c][20]; //Gas company name
double p[c];// Gas price per galon.
while (c>=i){
printf("\nEnter gas name:");
scanf("%s",name[i]);
printf("\nEnter gas price of per galon:");
scanf("%lf",&p[i]);
printf("\nMiles per galon:");
scanf("%lf",&dist[i]);
ppm[i]=p[i]/dist[i];
i=i+1;
}
i=1;
printf("\n|Name | \t |Price| \t |Per mile price| \n");
while (c>=i){
printf(" %s \t\t $%.2f \t $%.2f\n",name[i],p[i],ppm[i]);
i=i+1;
}
i=1;
int s=1;
ppm[0]=ppm[i];
while (c>=i)
{
while (ppm[i]<ppm[0]){
ppm[0]=ppm[i];s=i;
}
i=i+1;
}
printf("\nGas %s the best deal with $%.2f price \n",name[s],p[s]);
return 0;
}
I am watching this video on debugging with gdb and when I click on the link with the files for the demonstration, it takes me here: https://github.com/cbourke/ComputerScienceI/tree/master/hacks/hack9.0-files, which doesn't exist. I'm assuming the link should be going here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.