#include <stdio.h> int main() { int i=1,sum=0; while (i<=5) { if(i%2!=0) { sum=sum+i; } i++; } printf("sum of odd no=%d\n",sum); return 0; }
To embed this project on your website, copy the following code and paste it into your website's HTML: