PFC - Workshop 01 Please do the
followings before starting the work:
Create the
directory with a name like
-number>-workshop-01, e.g.
SE0412-QuangTV00456-workshop01 (1)In the directory (1),
create 2 sub-directories named:
QUES1 and
QUES2.
The workshop consists of 2 questions. The solution for each question
will be included in corresponding directory. In each sub-directory there are at
least 2 files: main.cpp and run.bat file. The main.cpp file is your program and
the run.bat file contains statements to compile and run the main.cpp file.
Examples for bat files:
Dev-C++ bat file | Borland C++ bat file |
cls C:\DEV-CPP\BIN\C++ -o main main.cpp main pause del main.exe | cls C:\BC5\BIN\bcc main.cpp main pause del main.exe |
Submission Requirements:Compress the folder (1)
to .zip (or .rar) file (with the same
name) and upload to cms.
Note: If the workshop is one question only
then you do not need to create sub-directories. In general the number of
subdirectories is equal to number of questions.
Question 1:
using printf() in stdio.hWrite a C
program that prints on the screen the sentence:
Now
is the time to learn C Question 2: Write a program that prompts a user to enter code,
salary, bonus and displays
the entered
data on the screen.
The output
from your program looks something like: