Quick question: C++

I made a simple program here to covert KG to LBS, but how would I for example make the KG count by 2. For example I want the KG chart to go 1, 3, 5, 7, 9, etc.

Thanks!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

int main()
{
   
   const int MIN_NUMBER = 1,
             MAX_NUMBER = 10; 
             
   int num = MIN_NUMBER;
   
   cout << "Kilograms       Pounds\n";

   while (num <= MAX_NUMBER)
   {
        cout << num << "\t\t" << (num * 2.2) << endl;
        num++;
   }
    
   return 0;
}
Last edited on
instead of num++, try num += 2
Thank you. :)
Topic archived. No new replies allowed.