answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

Program in c language divede a given number in two parts such that product of these two numbers is maximum?

int maxprod (int n) { return n/2; } int main (void) { int n, a, b; n= 7; /* for example */ a= maxprod (n); b= n-a; printf ("%d+%d=%d, %d*%d=%d\n", a, b, a+b, a, b, a*b); }


What is theprogram to generate n Fibonacci numbers n please explain each statement?

Program to Print Fibonacci Series#include#includevoid main(){int n,i,f1=0,f2=1,f3;clrscr();printf("Enter n number : ");scanf("%d",&n);printf("%d\t%d",f1,f2);for(i=3;i


Multiplication table using do while loop?

#include void main() { int i=2,m,n; printf("enter number"); scanf("%d",&n); do { m=i*n; printf("%d*%d=%d\n",n,i,m); i=i+1; } while (i<=10); }


Write a program of using recursion to create a table of any number?

/*mycfiles.wordpress.com Program to prepare Table of any no. using while loop*/ #include #include void main() { int n,t,count=1; clrscr(); printf("Enter any number\n\n"); scanf("%d",&n); while(count<=10) { t=n*count; printf("\n%d*%d=%d",n,count,t); count++; } getch(); }


Can someone make write you a program that tells somebody their zodiac signs the program asks a person their year month and day they were born and it should be for the Chinese Zodiac and Western?

#include <stdio.h> #include<string.h> main() { char s[80]; int d; clrscr(); printf("enter the month of your birthday: "); gets(s); if(!(strcmp(s, "january"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=19) printf("\n CAPRICORN"); else printf("\n AQUARIUS"); } if(!(strcmp(s, "february"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=18) printf("\n AQUARIUS"); else printf("\n PISCES"); } if(!(strcmp(s, "march"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=20) printf("\n PISCES"); else printf("\n ARIES"); } if(!(strcmp(s, "april"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=19) printf("\n ARIES"); else printf("\n TAURUS"); } if(!(strcmp(s, "may"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=20) printf("\n TAURUS"); else printf("\n GEMINI"); } if(!(strcmp(s, "june"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=20) printf("\n GEMINI"); else printf("\n CANCER"); } if(!(strcmp(s, "july"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=22) printf("\n CANCER"); else printf("\n LEO"); } if(!(strcmp(s, "august"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=22) printf("\n LEO"); else printf("\n VIRGO"); } if(!(strcmp(s, "september"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=22) printf("\n VIRGO"); else printf("\n LIBRA"); } if(!(strcmp(s, "october"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=22) printf("\n LIBRA"); else printf("\n SCORPIO"); } if(!(strcmp(s, "november"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=21) printf("\n SCORPIO"); else printf("\n SAGITTARIUS"); } if(!(strcmp(s, "december"))) { printf("\n enter the date of your birthday: "); scanf("%i", &d); if(d<=21) printf("\n SAGITTARIUS"); else printf("\n CAPRICORN"); } getch(); }

Related Questions

What are the release dates for N-Y-P-D- - 1967 The Body in the Trunk 2-13?

N-Y-P-D- - 1967 The Body in the Trunk 2-13 was released on: USA: 7 January 1969


How many ways can you make change for a dollar using nickels dimes andor quarters?

There are 22 ways to make change from a dollar using nickels, dimes, and quarters. 1. 4 q 2. 10 d 3. 20 n 4. 2 q , 5 d 5. 3 q , 2 d , 1 n 6. 1 q , 7 d, 1 n 7. 9 d, 2 n 8. 8 d, 4 n 9. 7 d, 6 n 10. 6 d , 8 n 11. 5 d , 10 n 12. 4 d , 12 n 13. 2 d , 16 n 14. 1 d , 18 n 15. 5 n , 3 q 16. 3 n , 1 q , 6 d 17. 7 n , 1 q , 4 d 18. 9 n , 1 q , 3 d 19. 11 n , 1 q , 2 d 20. 13 n , 1 q , 1 d 21. 14n , 3 d 22. 15n , 1 q


What are the release dates for N-O-P-D- - 1956 The Teen-Age 13 Percent 1-33?

N-O-P-D- - 1956 The Teen-Age 13 Percent 1-33 was released on: USA: 1956


What are the release dates for N-Y-P-D- - 1967 Joshua Fit the Battle of Fulton Street 1-13?

N-Y-P-D- - 1967 Joshua Fit the Battle of Fulton Street 1-13 was released on: USA: 5 December 1967


What term of an AP 5 13 21 is 181?

a= 5 , d= 13-5 = 8 , an= 181 an = a + (n-1) x d 181 = 5 + (n-1) x 8 181 - 5 = (n-1) x 8 176 = (n-1) x 8 176/8 = (n-1) 22 = (n-1) 22+1 = 23 n = 23 Hence, 181 is the 23rd term of the given A.P


The ratio of the numerator to the denominator of a certain fraction is 5 to 8 If 5 is subtracted from the numerator and 4 is added to the denominator the new fraction reduces to one half Find fraction?

The fraction is 35/56.The way to find it is as follows:1) n/d = 5/82) (n-5) / (d+4) = 1/23) n = (5/8)*d [rearrange (1)]4) 2*(n-5) = (d+4) [rearrange (2)]5) 2*n - 10 = d + 4 [rearrange (4)]6) 2*n = d + 14 [rearrange (5)]7) 2*((5/8)*d) = d + 14 [substitue (3) into (6)]8) (10/8)*d = d+14 [rearrange (7)]9) (10/8)*d - d = 14 [rearrange (8)]10) (10/8)*d - (8/8)*d = 14 [rearrange (9)]11) (2/8)*d = 14 [rearrange (10)]12) d = 14 / (2/8) = 14 * 8/2 [rearrange (11)]13) d = 112/2 = 56 [simplify (12)]14) n = (5/8)*56 [substitute (13) into (3)]15) n = 280/8 = 35 [simplify (14)]16) THE ANSWER IS n/d = 35/56 [substitute (13) and (15) into the definition of the fraction]


What is the nth term for 14 13 12 11 10?

This is an arithmetic sequence which starts at 14, a = 14, and with a common difference of -1, d = -1. We can use the nth term formula an = a + (n - 1)d to get an = 14 + (n - 1)(-1) = 14 - n + 1 = 15 - n.


What does n stand for in the equation n - 26 -13?

39


How do you get the square of an integer in PHP?

printf ("square of %d is %d\n", $n, $n*$n);


A faction in witch the numbers is greater than or equal to the denominator?

Suppose the number is n/d. Then n/d >= d => n <= d2 if d < 0 or n >= d2 if d > 0.


Write a c program to find descending order of given elements in a list using arrays?

#include #include int main() { int a[20],i,j,n,temp; clrscr(); printf("\n Enter no. of elements for 1-D array : "); scanf("%d",&n); for(i=0;i<n;i++) { printf(" Enter element[%d] : ",i+1); scanf("%d",&a[i]); } for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } printf("\n\n Decending order of inserted array is : "); for(i=0;i<n;i++) { printf("\n %d ",a[i]); } getch(); return 0; } Output: Enter no. of elements for 1-D array : 5 Enter element [1] : 2 Enter element [2] : 10 Enter element [3] : 4 Enter element [4] : 13 Enter element [5] : 7 Decending order of inserted array is: 13 10 7 4 2


L N G E D N A?

E N G L A N D