Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int start,end,i;
- scanf("%d%d",&start,&end);
- if(start<=end)
- {
- for(i=start;i<=end;i++)
- {
- if(i%2==0)
- {
- printf("%3d",i);
- }
- }
- }
- if(start>end)
- {
- for(i=start;i>=end;i--)
- {
- if(i%2==0)
- {
- printf("%3d",i);
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment