No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hey guys, I am trying to self teach C++ and I am to the point of loops. Now I was working on how to create a triangle with manipulating nested loops to create a triangle with numbers. Here is the code I have ended up with: [CODE]/* Print a number … |
|
[CODE]/* This program reads a test score, calculates the letter grade for the score, and prints the grade. */ #include <iostream> using namespace std; char studentScore (int score); int main () { cout << "Enter the test score (0-100): "; int score; cin >> score; char grade = studentScore (grade); … |
|
Alright, in this situation I want to take a program that I wrote and modify it so it can take an integers and if any of the numbers are negative, it returns a negative number, but if all the numbers are positive, it returns their average. This is the program … |
|
Hey guys, I am trying to create a number triangle that looks like this. 123456789 12345678 1234567 123456 12345 1234 123 12 1 This is where I'm at: [CODE]#include <iostream> using namespace std; int main () { int limit; // Read limit cout << "Please enter a number between 1 … |