Thanks for the response. The only reason i say its not efficient is because i have to write loop 7 times. So i thought of a new way of doing it.
for(int i=0;i<7;i++)
for(int...
Type: Posts; User: zerlok
Thanks for the response. The only reason i say its not efficient is because i have to write loop 7 times. So i thought of a new way of doing it.
for(int i=0;i<7;i++)
for(int...
for(int i=0;i<Counter[0];i++)
{
cout<<"I";
}
for(int j=0;j<Counter[1];j++)
{
cout<<"N";
}
i found out that this works but it's not very efficient...
I can't use Counter as the Loop size.
for(int i=0;i<Counter;i++)
wont work because counter is an array.
void eMath::GetIndex()
{
for(int i=0;i<MAX_SIZE;i++)
{
if(eNumber[i]== 'I' )
Counter[0]++;
if(eNumber2[i]== 'I' )
Counter[0]++;
if(eNumber[i]== 'N' )
Thanks! It'll just take some time to get it done but i get it.
So, i'm trying to figure out the algorithm for detecting egyptian numbers in the array and adding them properly.
I can't seem to understand how to go from here. I can't think of how to add the...
void output(char name[][30],float totaldata[][6], int counter)
{
for(int i=0;i<counter;i++)
for(int j=0;j<counter;j++)
cout<<left<<setw(31)<<"Name"...
Help with CODE can't seem to make the arrays i made and stuff to appear on screen.. (noobie)
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
const double...
ahh yes i can't use string because i'm not allowed to for this assignment...
cin.getline(empname) would work?
so i do loop for ex:
#include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
using namespace std;
const int number_of_rows=40;
getline(cin,name[count++]);
so like that right? but now that i put it in after i enter the number it just ends the program..
This is part of my code and i'm stuck on the cin part i dont exactly remember how it went for arrays... i need to cin a name that contains whitespace but when i do that the program starts looping...