C/C++ :: Use Characters In If Statement?
Oct 15, 2014
#include <stdio.h>
#include <math.h>
int main(void)
{
[Code]....
That's my code above and I'm getting an error saying that I'm "implicitly declaring library function 'strcmp' with type 'int(const char*, const chat*)". When i run this program and enter in Black for the first prompt, the program stops. I'm trying to make this program so that when I enter Black as the answer for the first prompt, the program will display the value 10.
View 1 Replies
Jul 28, 2013
I'm trying to put an if-else statement in a do-while loop and when I put the correct answer in the if statement I get that error. Here's the program:
#include <iostream>
using namespace std;
int main() {
int answer;
char repeat;
[Code] .....
View 5 Replies
View Related
Mar 20, 2014
so my question is i want to print characters,no string just an array of characters,i do this but it s not working,maybe i have to put the '' at the end?
Code:
int main() {
int i;
char ch[5];
for(i = 0; i < 5; i++) {
scanf("%c",&ch[i]);
[Code]...
View 6 Replies
View Related
Jul 6, 2014
Im supposed to find the common characters between two string characters, assuming that the user wont input duplicate letters like ddog. When I run my code I get an output of a question mark upside down. Here is my code with comments on what each part is supposed to do
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char str1[20], str2[20],remp = '