我在d:drive中创建了一个名为abc的文本文件.我无法打开它.请告诉我怎么做.
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
FILE *fp;
clrscr();
fp = fopen("D:/abc.txt","r");
if(fp == NULL)
{
printf("\nCannot open");
getch();
exit(1);
}
fclose(fp);
getch();
}
Run Code Online (Sandbox Code Playgroud) 以下pl/sql程序在行上执行生成错误sum:= temp*sum; 遇到符号; 期待时(.请解释我的错误.
declare
n number;
temp number;
sum number := 1;
begin
n := &n;
temp := n;
while temp>0 loop
sum := temp*sum;
temp := temp-1;
end loop;
dbms_output.put_line('Factorial of '||n||' is '||sum);
end;
/
Run Code Online (Sandbox Code Playgroud) 我在编译以下程序时非法使用浮点错误.请让我知道我犯了什么错误.
#include<stdio.h>
#include<conio.h>
void main()
{
float a;
clrscr();
printf("\n Enter the num : ");
scanf("%f", &a);
if ( a >= 0 )
{
if ( (a % 2) == 0 ) //ERROR HERE
{
printf("\n You entered a positive even num");
}
else
{
printf("\n You entered a positive odd num");
}
}
else
{
if ( (a % 2) == 0 ) //ERROR HERE
{
printf("\n You entered a negative even num");
}
else
{
printf("\n You entered …Run Code Online (Sandbox Code Playgroud)