Could anyone explain how to use the following command:
$ cb file1.c > file2.c
I'm suppose to write a program to read input from file1.c and write the output to file2.c My lecturer insisted us to use this command and I have no idea how to use.
My program is as follows:
/* To calculate the sum of 1/(x*x) */
#include<stdio.h>
main()
{
int i,n;
float sum;
$ cb file1.c file1.c > file2.c
scanf("%d", &n);
for (i=n, sum=0.0;i>0;i--)
sum += 1/((float)i*(float)i);
printf(out,"Sum=%f\n", sum);
}
I had tried inserting the command directly as you can see into the program but when I compiled the following errors appeared:
try.c: In function `main':
try.c:13: `$' undeclared (first use in this function)
try.c:13: (Each undeclared identifier is reported only once
try.c:13: for each function it appears in.)
try.c:13: parse error before `cb'
try.c:18: `out' undeclared (first use in this function)
Please help. Thanks