Newbie to C, please help ??
use this function to calculate both area and circumference of a circle and to print:
void CalculateAreaCirculferenceOfCircle_techQH(double RadiusOfCircle) { printf("Area of Circle=%lf",3.14*RadiusOfCircle*RadiusOfCircle); printf("Circumference of Circle=%lf,2*3.14*RadiusOfCircle); }
else you want a function then try :
double CalculateArea_TechQH(double RadiusOfCircle) { return 3.14*RadiusOfCircle*RadiusOfCircle; } double CalcuateCircumferenceOfCircle(double RadiusOfCircle) { return 2*3.14*RadiusOfCircle; }
WAP to find the minimum number of swaps required for arranging pairs adjacent to each other?
Input: pairs[] = {1->3, 2->6, 4->5} // 1 is paired with 3, 2 with 6 ... arr[] = {3, 5, 6, 4, 1, 2}
Output: 2 {3, 1, 5, 4, 6, 2} by swapping 5 & 6, and 6 & 1
I want to write a c program where I can count no of line, no of blank lines, no of commented lines and no of lines ending with semicolon, please help!!!