I hereby claim:
- I am rszewczyk on github.
- I am szewczyk (https://keybase.io/szewczyk) on keybase.
- I have a public key ASCB0ImqZCnmMYuF8jnyGVfepGbT-QNygunM_Bixq74FCwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// proof of concept for jest-emotion style snapshots for DOM Elements | |
import * as css from 'css' | |
function defaultClassNameReplacer(className, index) { | |
return `emotion-${index}` | |
} | |
const componentSelectorClassNamePattern = /\.e[a-zA-Z0-9-]+[0-9]+/ | |
export const replaceClassNames = ( |
#include <stdio.h> | |
void printIntegerArray(int array[], int size) | |
{ | |
int currentIndex = 0; | |
while (currentIndex < size) | |
{ | |
printf("%d\n", array[currentIndex]); | |
currentIndex = currentIndex + 1; | |
} |
In this assigment you will learn about arrays in C.
As part of this assigment you will create a program in a file called arrays2.c
.
When you complete the assigment you will submit arrays2.c
by uploading it to me
on Slack. If you do not finish today, you have until the start of class on Tuesday
11/28/2017 to submit it.
Create a file called arrays2.c
and paste in the following contents:
#include <stdio.h> | |
int main() | |
{ | |
int arraySize = 0; | |
while (arraySize < 1) | |
{ | |
printf("Enter array size: "); | |
scanf("%d", &arraySize); | |
if (arraySize < 1) |
Here are some optional practice problems to help you learn loops. You can implement all of them
using either for
or while
loops - or try both!
Write a program that asks the user to enter a positive integer. It should continue to prompt the user until they enter
Create file called stars2.c
and paste the contents of stars.c
from Class 16 into it.
Compile and run the program to make sure it works. Then modify the the code so that the part that prints the stars uses for
loops instead of while
loops (the part from line 18 to the end).
Submit your program to me on Slack. If you don't finish today, it is due by the end of next class (11/16/2017).
If you haven't already done so, complete the class 18 assigment and submit it.
When you are done save circles.c
to another file called circles2.c
. Modify it so that the program will run a maximum
of 5 calulcations - i.e. immediately after the program performs its fifth calculation it exits. It should still also exit
if the user at any point chooses not to continue.
The program should inform the user if it is exiting because it's reached the maximum calculations.
Finish the in class assigment from class 17 if you haven't already done so. You are strongly encouraged to complete the optional practice problems as well.
Write a program that prompts the user for two numbers, each of which represents
the radius of a circle. Your program will then calculate the difference in areas
if you subtract the area of the smaller circle from the area of the bigger circle.
Your program will then print the difference then ask the user if they wish to do
another calculation. If they type the character y
, the program