Sum of Numbers Divisible by 4 in C language
Write a Sum of Numbers Divisible by 4 in C program to calculate the sum of all numbers from Zero to 100 which can be divisible by 4. Program ought to straight print the Sum of Numbers Divisible by 4 in C.
Sum of Numbers Divisible by 4 Program will merely begin with Zero to 100 and test for numbers Divisible by 4.
Sum of Numbers Divisible by 4 C Code
1 |
#embody<stdio.h><br/><br/>#embody<conio.h><br/><br/>void major()<br/>{<br/>int i,sum=0;<br/>clrscr();<br/>for(i=0;i<=100;i++)<br/>{<br/>if(i%4==0) <br/>sum=sum+i;<br/>}<br/><br/>printf(“naddition of numbers from Zero to 100 which can be divisible by 4 isnpercentd”,sum);<br/>getch();<br/>} |
Sum of Numbers Divisible by 4 Output Snapshot
Supply projectgeek.com