Giter Club home page Giter Club logo

computersciencei's People

Contributors

cbourke avatar hbiede avatar nicomp42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

computersciencei's Issues

2.27 example values

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.

TA guidelines for hours

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

Syllabus Clarification

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.

Chapter 3 examples

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;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.