Computer Science, asked by sadaffarheen20, 1 month ago

write a program in c++to print first 50 even numbers using loops​

Answers

Answered by jhapriyanshu216
1

Answer:

use for loop but you can take do or while loop also

Explanation:

#include <iostream.h>

using namespace std;

int main( )

int i=1,s=0

for (i=1,i<=50,i++)

if ( i%2==0)

s=s+i

cout<<"first 50 even no. is"<<s<<endl;

return 0;

}

Similar questions