- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Hello, I am trying to compute the GCD non-recursively. I have no errors but when I run the program it aborts because it says c is not intlized. [code=cplusplus] #include "stdafx.h" #include "stdio.h" int main (void) { int a,b,c,r,result; printf("enter a value for a\n"); scanf ("%d", &a); printf("enter a value … |
|
Hello! I am working on some code for a program that squares,sums and divides 3 numbers: [code=cplus] int num,sq,sumd; int a; int b; int c; printf ("Please enter a positive integer for a/n"); //input scanf ("%d", &a); printf ("Please enter a positive integer for b/n"); //input scanf ("%d", &b); printf … |
|
Hi I am working on a program that computes the sum of N in increments of 3. I do not have any errors but when you run the program it does not compute correctly for example if you enter 2 for n the sum should be 5 [code=cplusplus] #include "stdafx.h" … |
|
I am working on printing a loop statement. I worked on this to try the concept: [code=cplus] #include "stdafx.h" #include "stdio.h" int main() { int times,num; for (times=1; times<3; times++) { for (num=1; num<5; num++) { printf("%d",num); } printf("\n"); } return 0; } [/code] What I need is to print … |
|
#include "stdafx.h" #include "stdio.h" [code=cplus] void swap (int a, int b); int main (void) { int a,b; printf("enter 2 positive integers"); scanf("%d",&a,&b); swap (a,b); printf("d%d,a,b\n"); } void swap (int a, int b) { int swap (a,b); } [/code] I have one error (20) : error C2078: too many initializers |
|
Hello, I am working on a non-recursive function that computes a to the power n. I have one error which is cpp(23) : error C3861: 'mypower': identifier not found [code=cplusplus] #include "stdafx.h" #include "stdio.h" double power(float a, int n); // function prototype// int main (void) { float a; int n; … |
|
Hello, I need to modify the following function to compare with the library power using power (double, double) [code=c] #include "stdafx.h" #include "stdio.h" double mypower(float a, int n); // function prototype// int main (void) { float a; int n; int power; printf("\n enter a value of a\n"); scanf ("%d", &a); … |
|
I am trying to write a recursive function that compute a to the n. here is as far as I have gotten as far as code [code=c] #include "stdafx.h" #include "stdio.h" int power (int n); // function prototype// main() { float a; int n; printf("\n enter values of a an … |
|
Re:
I am new to dreamweaver and want to set the colors on a web page in a user friendly mode. I am using the two column hybrid template, and can set the background color with the page properties, but cannot find the way to set the footer, header, side column, … |
|
I created this function and I need help turning this into a recursive function [code=c] #include "stdafx.h" #include "stdio.h" int fact (int n); // function prototype// int main (void) { int n,result; printf("please enter a positive integer"); scanf("%d", &n); result = fact(n); printf("The answer is %d\n", result); return 0; } … |
|
Hello, I am trying to do a recursive function using fiboncci. I have been working on this and it is not working. #include "stdafx.h" #include "stdio.h" int fib (int n); // function prototype// int main (void) { int num, result; printf ("Please enter a positive integer\n"); scanf ("%d", &num); result= … |