Showing posts with label Programming Language. Show all posts
Showing posts with label Programming Language. Show all posts

C Programming INPUT test

 C Programming INPUT test

THE SOURCE CODE




#include <stdio.h>
#include <string.h>

int main(){
/* STORING INPUTS*/

char codes[10];
char fname[10];
int numc;
int numb;

//main functions begins form here//

printf("TYPE THE NAME: \n");
scanf("%s", codes);


if (strcmp(codes, "zedonfire")==0){
   printf("You are on the right path %s. \n", codes);
   printf("now type the code: \n");
   scanf("%d", &numc);

   if(numc == 2359){
      printf("VERY GERY FINE\n");
      printf("NOW TYPE THE SECOND CODE:\n");
      scanf("%d", &numb);

      if (numb == 9990){
         printf("YOU HAVE WON THE AMAZING JOURNEY\n");
         printf("NOW TYPE THE FINAL NAME:\n");
         scanf("%s", fname);
         if (strcmp(fname, "FAISAL")==0){
            printf("YOU ARE SUCCEED\n");
            printf("CONGRATULATIONS");
         }
         else
         {
            printf("NO ONE CAN SAVE YOU");
         }
      }
      else
      {
         printf("RUN FOR LIFE");
      }
   }
   else
   {
      printf("NOW ITS TIME TO SEE THE C");
   }
}
else
{
   printf("COME BACK TOMORROW");
}
return 0;
}

The Very Simple First Code

The Very Simple First Code 


Few weeks back when i first started working on Python in Pycharm IDE .

 [The Code is here]



contacts={
'name': 'MD ZIAUR RAHMAN',
'dob': '02-07-1992',
'email' : 'rehmanzed@gmail.com',
'phone' : '017047777777',
}

password=input("Enter The Passcode: ")
if password=="zed":
set = input("search here please : ")
if (set in contacts):
print(contacts[set])
set1 = input("TRY AGAIN : ")
if (set1 in contacts):
print(contacts[set1])
set2 = input("TRY ANOTHER : ")
if (set2 in contacts):
print(contacts[set2])
set3 = input("TRY LAST ONE : ")
if (set3 in contacts):
print(contacts[set3])
print("THANX A LOT")
else:
print("NOT FOUND")


You will asked to write a code , if its True then the next statement will come one by one .If the input is true then it will print the value which i assigned in the code .






POST

The Very Simple First Code