108 Posted Topics

Member Avatar for restrictment

How do I add an array? I tried this: [code] #include <iostream> #include <cstdlib> using namespace std; int main() { int i, numEntered, total; int number[10]; for (i = 0; i <= 9; i++) { cout<<"Number: "; cin>>number[i]; numEntered = number[i]; } for (int i = 0; i < 10; …

0
82
Member Avatar for restrictment

Hey, I have been searching this for a while now, and I cannot find a c++ code that expands the window once opened. I have found multiple codes that claim it opens it in an expanded window, but in the end all I get is compiling errors. If someone would …

Member Avatar for SCoder1
0
168
Member Avatar for itzaaron

declare x outside of the for loop. Usually works for some reason.. [CODE]#include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int num[3], [COLOR="Red"]x = 0[/COLOR]; for(x; x<3; x++) { cout << "Enter a number: "; cin >> num[x]; } int sum = 0; for(int x=0; x<3; x++); …

Member Avatar for itzaaron
0
173
Member Avatar for amishraa
Member Avatar for thescroll
Member Avatar for restrictment
0
42
Member Avatar for ashin
Member Avatar for restrictment

Hello all, I am currently making an rpg type game in C++. The code is bellow: [code] #include <stdlib.h> #include <time.h> #include <iostream> #include <fstream> #include <string> #include <windows.h> using namespace std; int main() { int person, opponent, atk, asuccess, msuccess, game = 1, counter1=1, level = 1, atr, a, …

Member Avatar for Clinton Portis
0
153
Member Avatar for restrictment

Hey Everyone, in class we are learning about for loops, which are very easy. However the project the teacher gave us is very difficult. Here is the assignment: [quote]Write a program that prints the following patterns seperately one below the other. Use for loops to generate the patterns. All asterisks(*) …

Member Avatar for restrictment
0
170

The End.