Thursday, September 10, 2020

scores.c -- Arrays version

#include <stdio.h>

#include <cs50.h>

 int main(void)

{

int scores[3];

scores[0]=72;

scores[1]=73;

scores[2]=33;


printf("average: %i\n", (scores[0] + scores[1] + scores[2])/3 );

}



cs50, lec2



scores.c

#include <stdio.h>

#include <cs50.h>


int main(void)

{

int score1= 72;

int score2= 73;

int score3=33;


printf("average: %i\n", (score1+score2+score3)/3);

}




 cs50, lec2