#include <stdio.h> int main() { int std,marks,count=1,total=0; int sum=0; while(count){ printf("enter marks :"); scanf("%d",&marks); sum=sum+marks; count++; total++; if(marks==888) break; } int avg=(sum-888)/total; printf("average is : %d",avg); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter