程序执行之后没有结果输出,下面的代码为什么执行不了,函数调用有问题?求大神指导
#include<stdio.h>#include<stdlib.h>#include<math.h>voidmain(){doublea,b,c,d;a=1.01;b=...
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
void main()
{
double a,b,c,d;
a=1.01;
b=0.99;
c=1.02;
d=0.98;
double i,j,p,q;
i=pow(a,3);
j=pow(b,365);
p=pow(c,365);
q=pow(d,365);
printf("i=%f\n",i);
printf("j=%f\n",j);
printf("p=%f\n",p);
printf("q=%f\n",q);
system("pause");
} 展开
#include<stdlib.h>
#include<math.h>
void main()
{
double a,b,c,d;
a=1.01;
b=0.99;
c=1.02;
d=0.98;
double i,j,p,q;
i=pow(a,3);
j=pow(b,365);
p=pow(c,365);
q=pow(d,365);
printf("i=%f\n",i);
printf("j=%f\n",j);
printf("p=%f\n",p);
printf("q=%f\n",q);
system("pause");
} 展开
1个回答
展开全部
#include<iostream>using namespace std;struct NODE{ int data; NODE *next;};void InsertList(NODE** head,int bDate){ NODE *b,*p; b=(NODE*)new( NODE); if(*head == NULL) { (*head) = b; (*head)->data = bDate; (*head)->next = NULL; } else { p = *head; while (p->next != NULL) p=p->next; p->next = b; p = p->next; p->data = bDate; p->next = NULL; }}void OutputList(NODE*head){ NODE *p; p=head; while(p) { cout<<p->data<<" "; p=p->next; }}void main(){ NODE *head=NULL; int data[6]={25,41,17,98,5,67}; for(int i=0;i<6;i++) InsertList(&head,data[i]); OutputList(head); system("pause");}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询