0
Statement of the financial year: Write a program to verify a password entered by the user. Ask the user to enter a password and then he must write it in another field. Compare the entered values and send a message stating whether typed passwords are equal or not.
My code so far:
#include <stdio.h>
#include <stdlib.h>
int main(){
char senha1 [100];
char senha2[100];
printf("Digite sua senha:\n");
gets(senha1);
printf("Confirme sua senha:\n");
gets(senha2);
if (senha1==senha2)
printf("As senhas estao correspondentes");
if (senha1 != senha2)
printf("As senhas nao coincidem");
return 0;
}
The program does not recognize when the passwords are equal, I wanted to know what is wrong, I am still beginner.
I cannot use string functions. h