Difference between revisions of "CSC270 Demo Page with Code 2019"

From CSclasswiki
Jump to: navigation, search
(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...")
(No difference)

Revision as of 09:24, 25 April 2019

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;
}