Question

You are writing a new program. What information should be contained in a comment block at...

You are writing a new program. What information should be contained in a comment block at the top of that program? Pretend that you are explaining this concept to a new student that has never programmed before.

Homework Answers

Answer #1

In the comment block the aim of the program should be stated.what is the purpose of the program should be mentioned clearly.

Example:

// the aim of the program is to add two numers And place the result in the third number

#include<stdio.h>

int main()

{

int a, b, c;

printf("Enter two numbers to add\n");

scanf("%d%d", &a, &b);

c = a + b;

printf("Sum of the numbers = %d\n", c);

return 0;

}

For this instance it is a small problem .there were large program having 1000 ' s of lines of code .for those program comments are very useful to understand the logic going on in the code

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Create a new project. Type in the following program. Add a comment at the top...
1. Create a new project. Type in the following program. Add a comment at the top to include your name and the date. 2. Compile and Run with different values. What data values should you choose? Think about what we discussed in class. 3. Add code to compute the modulus. Hint: you will also have to declare a new variable. //this program demonstrates the use of various operators #include <iostream > using namespace std; int main() { int num1; int...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do depending upon what the user enters, please refer to the examples below to use to test your program. Run your final program one time for each scenario to make sure that you get the expected output. Be sure to format the output of your program so that it follows what is included in the examples. Remember, in all examples bold items are entered by...
This programming task will be a bit different. It will be more like what you would...
This programming task will be a bit different. It will be more like what you would receive if you were a maintenance engineer working in a corporate information systems or technology department. In other words, you will have some prebuilt source code provided for you that you must alter so it will meet the given programming specification.. Build a program from what you have been given as a starting-point. Rename the “starter code”. Do not add any modules; just, use...
How do you determine whether a new program should be recommended for creation and funding? Do...
How do you determine whether a new program should be recommended for creation and funding? Do you approve a program with a favorable rate of return and net present value that exceeds the governmental entity’s internal rate of return? Or, do you approve a program that serves the needs of citizens, but may not create the desired rate of return?
For PYTHON program you will be writing a program that will use if-else or if-elif-else statements....
For PYTHON program you will be writing a program that will use if-else or if-elif-else statements. Read-It-All bookstore has a book sales club where customers can earn reward points that can be used for their next purchase. If a customer purchases 0 books, he/she earns 0 points. If a customer purchases 1-3 books, he/she earns 5 points. If a customer purchases 4-6 books, he/she earns 10 points. If a customer purchases 7-8 books, he/she earns 15 points. If a customer...
Please do in a basic Java program and comment so that I understand what is going...
Please do in a basic Java program and comment so that I understand what is going on. Write a program that gives the statistics of a die being rolled 1000 times! Use a random number generator that picks only the number 1 through 6 and keep tally on each of each time the number is rolled. Store the number of times each number is rolled in the corresponding array index 1-6. For example, you will count the number of times...
Project 2 statement Please write this in JAVA. Please read this entire statement carefully before you...
Project 2 statement Please write this in JAVA. Please read this entire statement carefully before you start doing anything… This project involves implementing a simple university personnel management program. The program contains two different kinds of objects: students and faculty. For each object, the program stores relevant information such as university ID, name, etc. Different information is stored depending on the type of the object. For example, a student has a GPA, while a faculty has a title and department...
I. General Description In this assignment, you will create a Java program to read undergraduate and...
I. General Description In this assignment, you will create a Java program to read undergraduate and graduate students from an input file, sort them, and write them to an output file. This assignment is a follow up of assignment 5. Like assignment 5, your program will read from an input file and write to an output file. The input file name and the output file name are passed in as the first and second arguments at command line, respectively. Unlike...
Galen's first program outcome is "Safe, Patient-Centered Care." Upon completion of this program, you should be...
Galen's first program outcome is "Safe, Patient-Centered Care." Upon completion of this program, you should be competent and able to deliver safe, patient-centered care to all your patients. Every course you take in this program should help you towards those goals. Please address the questions below: What did you learn in Microbiology that will help you deliver safe, patient-centered care? Are there any patient care behaviors that you have changed in your nursing practice this quarter as a result of...
Assignment #4 – Student Ranking : In this assignment you are going to write a program...
Assignment #4 – Student Ranking : In this assignment you are going to write a program that ask user number of students in a class and their names. Number of students are limited to 100 maximum. Then, it will ask for 3 test scores of each student. The program will calculate the average of test scores for each student and display with their names. Then, it will sort the averages in descending order and display the sorted list with students’...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT