TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sabaka Sabakow
NA
3
2.3k
Help me with triangle.
Dec 18 2011 7:23 AM
Help me to run this.
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args);
int Heron(int a, int b, int c)
{
int p=(a+b+c)/2;
return sqrt(p*(p-a)*(p-b)*(p-c));
}
int main()
{
int a,b,c;
Console.WriteLine << " a: ";
Console.ReadLine >> a;
Console.WriteLine << " b: ";
Console.ReadLine >> b;
Console.WriteLine << " c: ";
Console.ReadLine >> c;
if(a<=0 || b<=0 || c<=0){
Console.WriteLine << " All values must be great from 0!\n";
system("pause");
return 1;
}
if(!(c<a+b) || !(a<b+c) || !(b<a+c))
{
Console.WriteLine << "Triangle no exist!\n";
system("pause");
return 1;
}
else
{
Console.WriteLine << "area triangle = " << Heron(a,b,c) << endl;
system("pause");
return 0;
}
}
Reply
Answers (
2
)
What is Error-The multi-part identifier "System.Data.DataRowView" could not be bound. in code bellow-
My data in not displaying in my grid