Introduction to Computer Science - Fall 2009
CSCI 151
Lab 7

  
Objectives:
loop while
types int, float, double
compiling and executing C code.   

Today: Lab Assignment ONLY. THERE ARE TWO BONUS QUESTIONS and ONE CHALLENGE!! You can make up your quiz 3 grade!

  • Program 1 (100 points)
  • Program Bonus 1 (10 points)
  • BONUS Program 2 10 points CHALLENGE Program

    Write a program that reads the 9 distinct integers from 1 to 9 and prints them out in the following way: each integer will be printed the number of times equal to its numeric value. Each such repeated output will be printed on a different line. The nine input integers may be input in any order. You may assume that correct input is always given.
    See example below.
    Example :
    Input: 1 2 3 4 5 6 7 8 9
    Output:
    1
    22
    333
    4444
    55555
    666666
    7777777
    88888888
    999999999

    Have a good evening.