CSC270 Demo Page with Code 2019

From CSclasswiki
Revision as of 09:24, 25 April 2019 by Thiebaut (talk | contribs) (Created page with "__TOC__ <br /> =Python= <br /> ::<source lang="Python"> # hello.py # Mickey Mouse # Displays a nice welcoming message. # Works with Python 2 or 3+ versions # To run: # # py...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


Python


# hello.py
# Mickey Mouse
# Displays a nice welcoming message.
# Works with Python 2 or 3+ versions
# To run:
#
#    python3 hello.py
# or
#    python hello.py
#
from __future__ import print_function
def main():
   print( "Hello Pluto!" )

main()


C


// hello.c
// Minnie Mouse
// To compile and run:
//
//    gcc -o hello hello.c
//    ./hello

#include <stdio.h>

int main( int argc, char *argv[] ) {
   printf( "Hello there, Mickey!\n\n" );
   return 0;
}