%-------------------------------------------------------
% exercise1.tex
%    Exercise 1.
%
% Irit Dinur
%--------------------------------------------------------

\documentclass[12pt]{article}
%\documentclass[twocolumn]{article}
\usepackage{alltt,url,amstext,amsmath,amssymb}

\setlength{\evensidemargin}{.0in}
\setlength{\oddsidemargin}{-0.3in}
\setlength{\textwidth}{6.8in}
\setlength{\textheight}{8.7in}

\newcommand{\sep}[1]{\,\left|\, {#1} \MakeBig\right.}
\newcommand{\brc}[1]{\left\{ {#1} \right\}}
\newcommand{\pth}[1]{\left( {#1} \right)}
\newcommand{\ceil}[1]{\left\lceil {#1} \right\rceil}
\newcommand{\floor}[1]{\left\lfloor {#1} \right\rfloor}

\newcommand{\remove}[1]{}
\newtheorem{theorem}{Theorem}[section] % section
\newtheorem{lemma}[theorem]{Lemma}
%\newtheorem{example}[theorem]{Example}
\newtheorem{defn}[theorem]{Definition}
\newcommand{\ctrl}{{\symbol{'136}}}
\newcommand{\examplex}[3]{
    \vspace{0.2cm}
    \noindent{\tt #1}

    \noindent{\bf \large Input:}
    {\tt #2}
 
    \noindent{\bf \large Output:}{\tt #3}

    \vspace{0.2cm}
}
\newcommand{\exmpinp}{\noindent{\bf \large Input:}\vspace{-0.3cm}}
\newcommand{\exmpout}{\noindent{\bf \large Output:}\vspace{-0.3cm}}
\newcommand{\MakeBig}{\rule[-.2cm]{0cm}{0.6cm}}
\newcommand{\unix}{{\tt UNIX}}
\newcommand{\dos}{{\tt DOS}}

\newcommand{\exercise}[2]{\section*{Ex {#1} ~ {#2}}}

\newcommand{\tildegen}{\protect\raisebox{-0.12cm}{\symbol{'176}}}
\newcommand{\atgen}{\symbol{'100}}
\newcommand{\email}{{\tt sariel\atgen{}math.tau.ac.il}}
\newcommand{\homepage}{{\tt http://www.math.tau.ac.il/\tildegen{}sariel/}}
 

% Title
\title{Introduction to Computer Science - Fall Semester 1998/9\\
   { {{Exercise}} 1}}

\author{{\bf Due:} 24/12/1998}

\date{}

\begin{document}
\maketitle

Note: You are to submit printouts of the source codes of the programs
along with printouts of a demonstrated running of each program.
\footnote{ {\bf Course web-page:}
      {\tt http://www.math.tau.ac.il/\tildegen{}dinur/C/fall98-9.html}      } 
\vspace{0.4cm}

\exercise{1.1}{Identifiers}
Which of the following are legal identifiers and why:
\begin{verbatim}
3id      _yes            0_no_o_no    00_go     star*it
1_i_am   one_i_aren't    xYshouldI    me_to-2   int
\end{verbatim}

\exercise{1.2}{Rectangle}
Write a program that asks the user for values of three sides of a
box (in cm), and outputs the volume (in cubic meters).

\exercise{1.3}{Unit conversion}
Write a conversion program that asks the user for a value in pounds, and then
converts it to kgs. {\it 1 pound = 0.4536 kg }. 

\exercise{1.3}{ASCII}
Write a program that asks the user for a capital letter, and then
prints the same later uncapitalized. (hint: the ASCII value of 'a' is
equal to the ASCII value of 'A'+32).

\end{document}



%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
