+ 1

Array missing number

Can anybody give me ans for an array of 1-100 where one num is missing (say 49)how to find it?

29th Jan 2019, 10:37 AM
Abishek M
Abishek M - avatar
4 Respostas
+ 2
Here is the pseudocode: find sum of array => store in variable total Output 5050-total
29th Jan 2019, 10:41 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
Okie. If the array is stored as m, int total = 0; for (int point = 0; point<99; point++){ total+=point; } cout<<(5050-total);
29th Jan 2019, 10:45 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
thanks bro ⏩ Prometheus ⏪ but if it possible can u provide any ex code for reference
29th Jan 2019, 10:44 AM
Abishek M
Abishek M - avatar
0
thanks bro ✌️
29th Jan 2019, 10:55 AM
Abishek M
Abishek M - avatar