Computer Science, asked by Yash161197, 1 year ago

Write a c++ program to omit zero's in a numer. Example: Input-5003407. Output:5347

Answers

Answered by ronit2k
1
#include <iostream> using namespace std; const int N=10; int main() { int t[10],i,nb=0; for(i=0;i<N;i++) { cout << "Type an integer: "; cin >> t[i]; nb+= (t[i]>=10); // note that true converts to 1, false to 0 } cout << "the number of integers greater or equal to 10 is: " << nb <<endl; return 0; }

Similar questions