لتقوم بكتابة برمجة حساب مساحة الدائرة ,ستحتاج إلى متغيرين , واحد لنصف القطر و سيشار إليه ب r و الآخر للمساحة وسيشار إليه ب area :
;float area ,r
; "cout << "please enter the radius of the circle
; cin>>r
;area =r*r*3.14
;cout <<"the circle's area for the radius that you have entered is "<< area