then how do i compare a string?
Type: Posts; User: msummers
then how do i compare a string?
the question that is asked is asking the user for a stringed response thus, the 'yes' is a string input for the program to determine whether or not a restart is required.
Could I do this:
if (x != 'yes')
end;
else
continue;
I think that I have a copy at home written in C++ that I would like to convert to C for my Final
If I had the code with me still I would have pasted it to show what it is that I am talking about
while writing a program in C how do I code a restart function for the program to re-initialize the program? What is the best way to do this as well?
Yes I searched first, and what I was looking for wasn't listed
thank you
The code now works after this:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include <stdio.h>
int main(){
int i, val = 1;
for(i = 1, i < 35, ++i){
printf("%15d%15u%15x%15o\n", val, val, val, val);
val *= 2;
}
return 0;
}
Does anyone know how to display the binary number system in the output of a program?
Any help would be greatly appreciated.