output of followeing code
int num01=1
int sum=0int cnt=2;
Answers
Answered by
0
Answer:
this✔✔
Explanation:
#include <iostream>
using namespace std;
int main() {
int a = 1;
int b = 0;
int sum = 0;
int cnt = 2;
int temp = 0;
int cal = 0;
for(int i = 1; a<=400; i++){
cal = 0;
temp = a;
while(temp!=0){
b = a % 10;
temp = temp / 10;
if(b == 5){
cal++;
}
}
if(cal == 0){
sum = sum + a;
}
a += (cnt * cnt);
cnt++;
}
cout<<sum;
}
Similar questions