c++ class help

[b]hello everyone i need help creating a program using while that terminates the loop when two intergers any two between 1 to 100 are equal with each other assignment me do ASAP!!!!! DUE SOON
[b]
1
2
3
4
5
6
7
int a = 1
int b = 2
while (a != b)
{
    a = rand() %100 + 1
    b = rand() %100 + 1
}


*PS, we're both missing the same amount of punctuation.
Last edited on
You PM'd me about how to put this into a program:

1
2
3
4
5
6
7
8
9
10
11
int main()
{
  int a = 1
  int b = 2
  while (a != b)
  {
      a = rand() %100 + 1
      b = rand() %100 + 1
  }
  return 0;
}
Topic archived. No new replies allowed.