No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I dont understand why it doesnt work like the first vector i can input ok but the program just ends right after that, like it wont let me input values for the second vector. [CODE]#include<iostream> #include<vector> using namespace std; int main () { vector<int> a1; vector<int> b1; cout << "Enter … | |
Does the array fine but when it does the function it wont work, if anyone can help that would be great! [CODE]#include <iostream> using namespace std; void reverse(int a[10], int size) { for (int j=0; j<size/2; j++) { int temp = a[j]; a[j] = a[size-j-1]; a[size-j-1] = temp; } return; … | |
I got the first part of my code from my teacher, its how the function should be done, I am just have trouble with what to put for my cin statments as, none of them work. Please help. [CODE]#include <iostream> using namespace std; void reverse(int* a, int n) { int* … | |
My code converts roman numerals to the number values but i dont know how to make it do deciamls too, like for example: XX-X. I need it to recognize the "-" and start the loop again. How do i do that? Here is the code: [CODE]#include <iostream> #include <string> using … | |
I am suppose to count the number of vowels in a user inputed string. I dont know what i am doing wrong it gives me one error? [CODE] #include <iostream> #include <string> using namespace std; int count_vowels(string str) { int count = 0; for (int i = 0; i < … |