+ 1

Insert char between loop result

hello, how can i insert a char between loop result? char is x and = loop result 2, 4 ,6 ,8 ,10 i want the last result like : 2x4x6x8x10=

21st Nov 2017, 8:39 AM
Dermawan Adji Saputra
Dermawan Adji Saputra - avatar
4 Answers
+ 4
@Immortal cout* :D
21st Nov 2017, 9:50 AM
Jakub Stasiak
Jakub Stasiak - avatar
+ 3
@Immortal I thought x was a variable
21st Nov 2017, 9:51 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
for (int i=2;i<=10;i+=2){ cout<<i; if (i<10){cout<<x;}}
21st Nov 2017, 8:57 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
thank you so much pegasus 🍻
21st Nov 2017, 9:01 AM
Dermawan Adji Saputra
Dermawan Adji Saputra - avatar