473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

call of nonfunction

#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>

void print_line(); /*function line*/
void show_menu(); /*function menu*/
void circle(float); /*function circle*/
void triangle(float,float); /*function triangle*/
void trapezoid(float,float,float); /*function trapazoid*/

void main()
{
float radius,circle,area,height1,height2,width1,parallel 1,parallel2;
char menu;
clrscr();

do{
printf("Calculating Area of Shapes of Grometry\n");
print_line();
show_menu();
scanf("%s",&menu);
menu=toupper(menu);
print_line();

if(menu=='C') /* check menu */
{ printf("Enter Radius >>"); /* input Radius*/
scanf("%f",&radius);
circle(radius); Error call of non function /*link circle*/
}
else if (menu=='T')
{ printf("Enter Width_Triangle >>"); /*input triangle*/
scanf ("%f",&width1);
printf("Enter Height_Triangle >>");
scanf("%f",&height1);
triangle(width1,height1); /*link triangle*/
}
else if (menu=='Z')
{ printf("Enter Parallel_1_Trapezoid >>"); /*input trapezoid*/
scanf ("%f",&parallel1);
printf("Enter Parallel_2_Trapezoid >>");
scanf("%f",&parallel2);
printf("Enter Height_Trapezoid >>");
scanf("%f",&height2);
trapezoid(height2,parallel1,parallel2); /*link trapezoid*/
}
else if (menu=='Q')
{ printf("----------End Program---------------\n");
}}
while (menu!='Q');
getch();
}
void print_line()
{ printf("======================================\n\n ");
}
void show_menu()
{ printf(" Menu");
printf("C :: Area of Circle\n");
printf("T :: Area of Triangle\n");
printf("Z :: Area of Trapezoid\n");
printf("Q :: Exit the Program\n\n\n");
printf("Select Menu >> ");
}
void circle(float radius) /* function circle*/
{ float circle=0;
circle = 3.14 * radius * radius;
printf("Area of circle is %.2f\n",circle);
print_line();
}
void triangle(float width1,float height1) /*function trpangle*/
{ float area=0;
area = 0.5 * width1 * height1;
printf("Area of Triangle is %.2f\n",area);
print_line();
}
void trapezoid(float parallel1,float parallel2,float height2) /*function trapezoid*/
{ float area=0;
area= 0.5 * (parallel1+parallel2) * height2;
printf("Area of Trapezoid is %.2f\n",area);
print_line();

}


help me !! please {Thank You very much}
Aug 27 '09 #1
1 5595
JosAH
11,448 Expert 8TB
You also have a local float variable 'circle'; it hides the declaration of any function named 'circle'. Rename one of them. btw, main() returns an int, it isn't a void function.

kind regards,

Jos
Aug 27 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hubert Baumeister | last post by:
Fifth International Conference on eXtreme Programming and Agile Processes in Software Engineering XP2004 June 6-10, 2004, Garmisch-Partenkirchen, Germany http://www.xp2004.org/
1
by: Marwan | last post by:
Hello I am using asynchronous delegates to make a call to a COM ActiveX object, but even though the call occurs on a separate thread, my UI is still blocking. If i put the thread to sleep in my...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
4
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage...
13
by: mitchellpal | last post by:
i am really having a hard time trying to differentiate the two..........i mean.....anyone got a better idea how each occurs?
13
by: shsingh | last post by:
I have a class A containing some map as data variables. I creat an object of class A on heap by allocatiing memory by using "malloc". This will return me the required memory but the object is not...
3
by: cberthu | last post by:
Hi all, Is it possible to have two connects in the same rexx script to different DB's? I have to get data form on DB (with specifics selects and filter out some values with RExx) and save the...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
12
by: Rahul | last post by:
Hi Everyone, I have the following code and i'm able to invoke the destructor explicitly but not the constructor. and i get a compile time error when i invoke the constructor, why is this so? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.