10. Using the online compiler
(Part 8) Write a program that counts upwards from 0 to 100 using a for loop
• Modify the program of Part 8 so that it counts upwards from 0 to 100 in steps of 2.
• Add this source code to your logbook.
• Run the program and add the output of this program to your logbook.
• Write a short reflective account of the code concentrating on its functionality and comparing the outputs against the source code
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
int main()
{
int i;
int count;
for(i=0; i<100; i++){
count++;
}
printf("%d ", count);
return 0;
}
Comments
Leave a comment