Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C programming failed...
#14
Spartacus, post: 81083, member: 1060 Wrote:why not just define the number variables as

float m1,m2,m3,m4,m5,per;
I was thinking like the same.........

Double post

Thanks Bison it worked AND NOW A BIG SALUTE TO PROGRAMMING KING!!Big Grin

Double post

Okay guys moved on to another problem could you get me outta here??
THE CODE:
Code:
#include <stdio.h>
int main()
{
char another;
int num;
do
{
printf("Enter a number");
scanf("%d",&num);
printf("Square of %d is %d\n",num,num*num);
printf("Want to enter another number? y/n");
scanf("%c",&another);
} while(another=='y');
return 0;
}
Now the problem is here
Code:
printf("Enter a number");
scanf("%d",&num);
printf("Square of %d is %d\n",num,num*num);
printf("Want to enter another number? y/n");
scanf("%c",&another);
after this executed
Code:
printf("Square of %d is %d\n",num,num*num);
Nothing HAPPENS IT DOESNT ASK!! Y/N!
I mean the square PROGRAM STOPS!
[Image: 629965_101.png][Image: dav8ugf75d010z8vovm.gif]

Messages In This Thread
C programming failed... - by Danger255 - Nov 27 2012, 12:40 PM
RE: C programming failed... - by Spartacus - Nov 27 2012, 12:43 PM
RE: C programming failed... - by Danger255 - Nov 27 2012, 12:46 PM
RE: C programming failed... - by Spartacus - Nov 27 2012, 12:57 PM
RE: C programming failed... - by Danger255 - Nov 27 2012, 02:26 PM
RE: C programming failed... - by Spartacus - Nov 27 2012, 03:23 PM
RE: C programming failed... - by Danger255 - Nov 28 2012, 12:47 PM
RE: C programming failed... - by M. Bison - Nov 28 2012, 01:48 PM
RE: C programming failed... - by Spartacus - Nov 28 2012, 02:29 PM
RE: C programming failed... - by Dr. gkovr - Nov 28 2012, 07:18 PM
RE: C programming failed... - by Danger255 - Nov 29 2012, 12:23 PM
RE: C programming failed... - by M. Bison - Nov 29 2012, 01:38 PM
RE: C programming failed... - by Spartacus - Nov 29 2012, 02:40 PM
RE: C programming failed... - by Danger255 - Dec 01 2012, 10:25 AM
RE: C programming failed... - by M. Bison - Dec 03 2012, 04:07 AM
RE: C programming failed... - by Dr. gkovr - Dec 03 2012, 04:41 AM
RE: C programming failed... - by Danger255 - Dec 03 2012, 01:39 PM
RE: C programming failed... - by Spartacus - Dec 03 2012, 02:49 PM
RE: C programming failed... - by Danger255 - Dec 06 2012, 12:33 PM
RE: C programming failed... - by Leaky - Dec 24 2012, 03:41 PM
RE: C programming failed... - by Danger255 - Dec 24 2012, 03:43 PM

Users browsing this thread: 1 Guest(s)