i was having trouble with this couse we use an asterisk sign instead of a graph but the output is so mixed up how will i will aline the asterisk..pls help me

# include <"stdafx.h">
# include <iostream>
# include <conio.h>
# include <string>
# include <windows.h>

void main()
 int president;
 int voters;
 int coe = 0;
 int coe = 0;
 int y; // loop
 char x= '*'
 int +; // total

  cout <<"voters for president:";
  cin >> voters;
   for (y=l;y<=voters;ytt)

  cout <<"survey for president!";
  cin>> president;

   if (president==1)
    cie = cie+l;
   else if (president==2)
     coe + coe+l;
   cout <<"total votes!"<<endl;
    x = cie/1;
   cout <<"votes from cie :" <<cie<<endl;
   for ( t=l; t<=x ; +++)
  cout <<'x';
  cout <<endl;
    cout <<"votes from coe<<coe<<endl;
    for (t=l; t<=x;+++)
cout <<'*'

Edited by WaltP: Added CODE Tags -- please use them

5 Years
Discussion Span
Last Post by WaltP

pls help me with my case study im getting mixed up...


int +; // total This is invalid. You can define a + operator in C++, but this is just a variable declaration, and invalid on the face of it. You would be better off to name it 'total' since that is what it represents.

Edited by rubberman: n/a


If you need help you need to explain what you need help with we are not mind readers please explain in detail what you are trying to do what the problem is and where in the code the problem occurs the more detail the better also you need to use code tags your code is very hard to follow without them ill add them this time and of course dont post twice you are allowed to edit your post for 30 minutes oh and one more thing in english we have things called sentences please use them it really helps communicating your information to others i think this post shows you why

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.