#include #include #include #include struct kyklos{ float aktina; }k; struct tetragwno{ float pleura; }t; struct orthogwnio{ float pleura1; float pleura2; }o; struct trigwno{ float mhkos1; float mhkos2; float mhkos3; }tr; int main() { char x; float embado; printf ("dwse ena apo ta grammata: K, T, O,R"); scanf ("%c",x); switch (x) { case 'K': scanf ("%f",&k.aktina); embado=3.14*pow(k.aktina,2); printf ("to embado tou kyklou einai:%f\n",embado); break; case 'T': scanf ("%f",&t.pleura); embado=t.pleura*t.pleura; printf ("to embado tou tetragwnou einai :%f\n",embado); break; case 'O': scanf ("%f",&o.pleura1); scanf ("%f",&o.pleura2); embado=o.pleura1*o.pleura2; printf ("to embado tou orthogwniou einai :%f\n",embado); break; case 'R': scanf ("%f",&tr.mhkos1); scanf ("%s",&tr.mhkos2); scanf ("%s",&tr.mhkos3); break; } system("PAUSE"); return 0; }