Wow, much thanks man. It's the little things that mess me up. ;)
Type: Posts; User: Tarento
Wow, much thanks man. It's the little things that mess me up. ;)
Sorry, but I changed number to integer, and it still gave a core dump.
The output should be like...
Mr/Ms Everhart's sale was 24900.00
His/Her commission is = 24900.00
The data is...
John Everhart 24900.
1 car
Paul Evans 95700.
4 cars
Juan Hernandez 45100.
2 cars
If I scan 10 numbers, how I put them in increasing order? :confused:
This is a simple programming, but I never really got how to do this.
printf("Enter 5 doubles: ");
scanf("%lf %lf %lf %lf %lf", &a, &b, &c, &d, &e);
printf("v[] = {%11.3lf %11.3lf %11.3lf...
doh. Much thanks everyone!
Hey y'all. I think I've gotten it down a bit okay. I'm still working on Part A (Finding min and max numbers), but it's not working completely yet.
#include <stdio.h>
#include <math.h>
int...
I thought that I had assigned m in min = m, but I know that was incorrect, and I don't know the correct way to assign it. :(
What program are you using to compile the program?
main()
{
int a, b, c, d;
double max, min, m, M, x, y;
printf("Enter four integers: ");
scanf("%d %d %d %d", &a, &b, &c, &d);
printf("%d %d %d %d", a, b, c, d);
printf("\n");
max = M;
If I scanned ten numbers, how do I printf the biggest number the program scanned?
Example: 1 2 3 4 5 6 9 8 7 10
Your Biggest Integer is: 10.
I'm not sure if this is a data problem or not, but here's the program.
#include <stdio.h>
#include <math.h>
main()
{
Yeah, it ain't working. My teacher insists the integral is correct, but I don't believe him. :( The integral looks correct, but maybe I'm not seeing something?
#include <stdio.h>
#include <math.h>
main()
{
double del_x, x, k, error, flag, f, sum, n_end;
int n_trap, n1;
printf("Part B:\n");
code[
printf("Type in three integers");
scanf("%lf %lf %lf", &m, &n, &o);
printf("%.2f %.2f %.2f", m, n, o);
[/code]
Let's say I put 1 2 -3. How do I make the output look like...
+1.00...
printf("Approximate cos(%d) = %lf", xdeg, 1-(double pow(radians, 2)/2) + (double pow(radians, 4)/24);
This is just a part of it, but everything seems to be right except for an error I get.
...
I put in
while(ch>='0' && ch <= '5');, and the but that doesn't seem to work?
{
char ch;
do{
printf("Enter a character 1-4 (0 to exit):\n");
do{
ch = getchar();
}
while(ch<='0' || ch > '0');
switch(ch){
case '1':
That would increase the number of even numbers I have by a factor of 2. I meant if I put 5 integers (1,2,3,4,5), then I should get an output.
Among 5 scanned integers there are:
2 positive even...
printf("Enter an integer:\n");
scanf("%d",&n);
if(n>0)pluscounteven+2;
else if (n>0)pluscountodd++;
else if (n<0)minuscounteven=-2;
else if (n<0)minuscountodd=-2;
else zerocount++;
This...
int k, m;
double n, a_n, x;
printf("Enter a positive integer m:\n");
scanf("%d", &m);
printf("Enter a double -1<x<=1:\n");
scanf("%d", &x);
for(k=1; k<m+1; k++)
{
Yep, I'm back. :(
I've been making really slow, but sure progress, but now I'm stuck.
{
int i;
int k;
for(i=1; i<21; i++)
Much thanks for the help Tonto, it worked! This is a bit harder than I thought. I think I can handle it from here. :)
This example has parentheses only to demonstrate it. The %2d specifies a field of width 2.
printf("(%2d) (%2d)", 1, 11);[/QUOTE]
I get this as a result.
Sphere ( 1) (11)Sphere ( 1)...
I'm doing homework right now, and it wanted me to do this.
Sphere ( 1) R = 1.10 A = 15.2053 V = 5.5753
Sphere ( 2) R = 1.20 A = 18.0956 V = 7.2382...