CS61C Spring 2011
1/18/11
Simple C Program | Simple Java Program |
#include <stdio.h> #define RC 5
int main(int argc, char* argv[]) { int i; for(i=0;i<RC;i++) { printf("Hello World\n"); } } | class HelloWorldApp { public static void main(String[] args){ int RC =5; for (int i = 0; i < RC; i++) { System.out.println("Hello World!"); } } } |
Quickly transcribe these programs into files, compile and run. This shouldn’t take more than a couple minutes. It’s just to make sure that your development environment is configured properly. You don’t have to demonstrate this to your GSI, but please do make sure both programs run as expected.