DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++14th Code (Loop using for)

   #include<iostream>
   using namespace std;
   int main()
   {
double a;
int b ; 
cout<<" Enter Number    : ";
cin>>a;
cout<<"Enter the number of repeatation : ";
cin>>b; 
for(a=0;a<b+1;a++)
{
cout<<" The number is -->  "<<a<<endl;
}
cin.get();
return 0 ;
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Retry later
Retry later