#include <stdio.h>
int main(){
int a, b, c, d;
printf("Insira um numero de quatro digitos: ");
scanf("%i",&a);
b=a%10;
c=a%100;
d=a%1000;
printf("%i\n%i\n%i\n%i",a,d,c,b);
return 0;
}
The program should receive a person's name and gender and show the data entered by the user, but when the program shows the name I typed it is appearing Null instead of showing the name.
#include <stdio.h>
#include <stdlib.h>
#inclu...
Hi! I'm trying to create a copy of a C file, but I'm not able to copy the content, it's just creating a new blank file, can anyone see where I'm going wrong?
#include <stdio.h>
int main() {
char str[100];
FILE *file = fopen("/ho...
I'm having trouble passing arguments by parameter.
The error occurs in line 23 column 5 and is as follows:
too few arguments to function 'imc'
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include <unistd...
Good evening! Sunday I discovered that I will have to learn python, that the subject that I will study will be in this language and can not escape. I studied well this week and managed to get to matrices, but I came across subtleties that I'm st...
How do I put a word with letters and numbers inside a char? For example, put on the board of an ABC-1234 car.
char a = ABC1234;
char b = DFG0000;
printf("1ª placa %s\n",a);
printf("2ª placa %s\n",b);
Give code error. How do I procee...
I am creating a user registry using struct . In it, there is the CPF field. As it is a very large field to save in numbers format, I decided to save as string, as well as in database where cpf is saved with varchar .
I do a valida...
How do I create a loop in Processing that switches between three or more scenarios (summer, winter and fall) when my object (car) reaches the edge of the window?
I'm using a Facebook APP (and JavaScript SDK) to use the login on a website, plus I should store some basic information about the user. By requirement of the teacher, this site was all built "using language C" (Mongoose).
The problem is: I...
I'm doing a program where the user enters 10 values, and at the end of it, displays a message saying the value total.
My code:
int rep,valor,soma;
while(rep < 10) {
printf("Digite um valor : ");
scanf("%d",&valor);...