Hi everyone. A bit stuck on a program. Im trying to make the basic structure of a prgram but it doesnt seem to work. Can anyone check it and tell me what im doing wrong? Once its working I intend to start putting some meat onto the program but first want the basic shell working:
Code:
#include<stdio.h>
void 1();
void 2();
void main()
{
char 3;
char repeat;
do
{
printf("Please press 'b' if you have a something and you wish to do\n or\n please press 'v' if you have something else you wish to do ");
scanf("%c",&3);
if (3='b')
{
2();
}
else
{
if (3='v')
{
1();
}
printf("Do you wish to repeat the program? (y/n)");
scanf("%c",&repeat);
}
while(repeat=='y');
}
void 1()
{
printf("it works");
}
void 2()
{
printf("it works");
}
due to time constraints Im not looking to increase the functionality of the code, I just want it to work. If we ca get it to print "it works" when I choose that function then that'd be great. i know there are issues with this program but dont have time to make it better, just need a basic functioning program. thanks for your help
also, as its an assignment ive had to change the details, so that I can see the principles and techniques without risking getting done for plagurism or something.
I edited important names and replaced them with 1, 2 or 3 so please bare in minf they arent actually 1, 2 and 3 in my program they are sensibly named variables and functions