Studiekeuzecheck

Studiekeuzecheck #

This web page contains information for the “Studiekeuzecheck” event, to give you some more information such that you can better judge if Electrical Engineering is the right study for you.


  1. The presentation.

  1. This is the website to program: https://www.programiz.com/c-programming/online-compiler/
    If it does not work, then this is an alternative: ttps://www.onlinegdb.com/

  1. The C syntax (printf, while, if, etc.) is in this cheat sheet

  1. This is the squares program. You can copy/paste it into the programming web site. You can also download squares.c
#include <stdio.h>
int main (void)
{
  int i, size;
  size = 3;
  printf("printing squares up to %d\n", size);
  i = 0;
  while (i < size) {
    printf("square=%d\n", i*i);
    i = i +1;
  }
}

  1. This is the template for the sum exercise. You can copy/paste it into the programming web site. (You can also download template-sum.c
#include <stdio.h>
int main() {
  int i, size, sum;
  size = 1000;
  sum = 0;
  ... replace this line by your code ...
  printf(" the sum up to %d is %d\n", size, sum);
}

  1. The ohm-problem.pdf (in pdf).

  1. This is the template for the Ohm exercise. You can copy/paste it into the programming web site. You can also download template-ohm.c
#include <stdio.h>
int main (void)
{
  float rnew, requiv = 0.0;
  int cmd = 0;
  while (cmd != 2) {
      printf("Equivalent resistor is %f\n", requiv);
      printf("Series (0), Parallel (1), or Quit (2)? ");
      scanf("%d", &cmd);
      if (cmd == 0 || cmd == 1) {
          printf("Resistance? ");
          scanf("%f", &rnew);
      }
      ... insert your code here ...
  }
  printf("Bye!\n");
}

  1. A representativew first exercise of the Programming and Engineering Challenge course 01-calculator.pdf.