mareksuscak / cs50 Goto Github PK
View Code? Open in Web Editor NEW๐ Harvard CS50x โ 2018 solutions ๐จโ๐ซ
Home Page: https://cs50.harvard.edu/x/2020/
๐ Harvard CS50x โ 2018 solutions ๐จโ๐ซ
Home Page: https://cs50.harvard.edu/x/2020/
When i submit the finance task, i take an error says: /check route confirms whether username is available. Can you guys help me please?
Hi Marek,
Im very new to this, can u explain from line 30 to 36. From my understanding, (cc_number % 10 = digit1) is to obtain the last number(if im not mistaken)? But why is digit2 = digit1? and why sum_of_even +=digit1? I look forward for your reply and would greatly appreciate a detailed explanation. Thanks!
Hey Marek,
Thanks for your sharing,
I am wandering in pset1 credit line 47, why the code is:
int multiple = 2 * digit1;
sum_of_double_odds += (multiple / 10) + (multiple % 10);
instead of:
(sum_of_double_odds += digit1 * 2) ?
Please correct me if I am wrong, say if the digit is 7, with your code the sum_of_double_odds
would add on 14 / 10 = 1.4 = 1, plus 14 % 10 = 4, which the result would be 5 instead of 14.
I finished my codes for the "Cash" in the problem set 1. It ran well except when I tried 0.42 or other values less than 0.2.
I would be very appreciated if anyone can help me with this problem? The code is provided below.
Thank you a lot.
`#include <cs50.h>
#include <stdio.h>
#include <math.h>
int main(void)
{
int amount;
int pennies;
int dime;
int nickle;
int quarter;
do
{
float received_money = get_float("Money received: ");
amount = received_money * 100;
}
while (amount <= 0);
do
{
quarter = amount/25;
}
while (quarter > 25);
do
{
dime = (amount%25)/10;
}
while (dime > 10);
do
{
nickle = ((amount%25)%10)/5;
}
while (nickle > 5);
do
{
pennies = (((amount%25)%10)%5);
}
while (pennies > 1);
printf ("Cashout: %i\n", pennies + dime + nickle + quarter);
}
`
J
Ja
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.