

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A computer science assignment for cs1372 students in the fall 2006 semester. The assignment focuses on data types, conditional statements, and for loops in c programming. Students are required to write a c program that demonstrates the behavior of different data types, converts numerical grades to letter grades, and uses a for loop to iterate through 20 random numbers. Instructions for setting up the development environment and compiling the code.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


The aim of this introductory assignment is for you to familiarize yourself with data types, conditional statements and for loops.
A basic Visual Studio Solution is accessible to you on the class web site as a zip file. Use this for the environment for solving the following problems.
The Assignment
The assignment is for you to program one C program that does the following:
The program must:
Part 1 – Verify the behavior of C data types
Part 2 – Convert a random numerical grade to a letter grade
Grade: 78; letter grade: C
#include <stdio.h> #include <stdlib.h>
int main(void) { srand(0); // do this once at the top of your program int x = rand(); // use this for each random number printf("Random number %d; max is %d\n", x, RAND_MAX); getchar(); return 0; }
Part 3 – Iteration using a for loop
Submission
basic.cpp to the WebCT Vista2 website (http://webct.gatech.edu/gtvista2).