as i said. That is puts() in case 2 and case 3. The string is added more 1 symbol at the first time. (only first time). I dont know why that.
Type: Posts; User: kingofdcp
as i said. That is puts() in case 2 and case 3. The string is added more 1 symbol at the first time. (only first time). I dont know why that.
so in my case, can't use puts ? if yes, pls tell me how to fix? thks
i removed but not solved yet ! If i still use:
for(i=0;i<n;i++) printf("%c", s1[i]); to print intead use puts(s1) it run without error
Thk for comment but problem in this code is different. I put fflush(stdin) but the problem does not solved.
Difference is in this code i use puts(s1); to print string intead use for(i=0;i<n;i++)...
I always receive wrong result at first time i run my program. When i type Hello Hello Hello, it will dislay Hello Hello Hello and a symbol. But it only appear at the first time.
You can run my...
I have fixed my program.
It should have "fflush(stdin)" in case 1 :)
I must Write a program using getchar() function only to read the character string from the keyboard until ‘.’ is terminated, then reverse the string and display result on on the screen.
I don't...
thk you, i have finished my program.
#include<stdio.h>
#include<conio.h>
void Value(float principal, float rate, int years, char choose)
{
int i;
if(choose == 'f')
{
printf("The present amount: $...
i think my homework is check for Master Card only. thk you very much
thk man but i think i have finished.
#include<stdio.h>
#include<conio.h>
main()
{
__int64 master_card;
int S1, S2, S, CDigit, number1, number2, temp;
when i use:
I use it to remove beginning number (number)
Dev-C++ said: integer constant is too lager for "long" type.
What should i do?
I Wrote my program
ok thks.
I can't understand:
Use datatype: _int64 master_card;
scanf("%l64d", &master_card); for reading 16 digits of master card
can you give me ex?
yes but I'm beginer so i can't write it with C programing. Can anyone help me write a full program to learn :-s
no, it only is my homework.plz help me
I'm beginer and I have a workshop.
I need to code a program to check validate of Master Card.
Ex:
Check this card number: 5368235896831135
Step 1: Starting from the second digit from the...