In C programming, when you divide two integers, it performs integer division. This means the result will only include the whole number part, and the decimal part will be discarded. For example, if you write 7 / 10, the result will be 0, because C only keeps the integer portion of the division.
@Bran-m1nАй бұрын
thank you so much
@MRMR-gu7vc7 ай бұрын
Sr configuration clear ni nzr a rhi bki thk smjha rhy ap
@himandeka8b21610 ай бұрын
Isme toh apne "return 0" diya hi nahi. Sir first app khud sikhiye phir hame sikhana
@cse-learning10 ай бұрын
Zarur.
@success755010 ай бұрын
thank you so much for the video, how do you go ahead to add those extracted numbers please. thank you again.
@cse-learning10 ай бұрын
I am glad that I could help you. As the extracted number are stored in digit, you can add values of digits. kzbin.info/www/bejne/h3rdaKKMZ7Z6fbs --> You can see an example here. kzbin.info/www/bejne/h3rdaKKMZ7Z6fbs --> explanation is here in this video (in Hindi)
@success755010 ай бұрын
@@cse-learning Thank you
@simirnac736410 ай бұрын
Can you send Tamil pls
@cse-learning10 ай бұрын
Tamil is too difficult for me. I tried to learn but couldn't 😅. you can watch another video which is in English: kzbin.info/www/bejne/rICyk4Gvi82hbLM
@sabbir_ahmed_fahim11 ай бұрын
hhow i can relate why we use 10000% in C programming
@cse-learning10 ай бұрын
Question is not clear to me. please rephrase.
@raneem_mousa Жыл бұрын
Thanks that was helpful
@oscarvazquez4600 Жыл бұрын
Really good explanation thank you
@akaStarboyy Жыл бұрын
bro how can we extract the first digit , like we are finding last digit first by remainder method.??
@cse-learning Жыл бұрын
The straight answer is 'I don't think its possible' without any inbuilt function. In Python, its too easy. But as a programmer, its up to you what you are doing in back but getting the expected result.
@cartoongaming3586 Жыл бұрын
That is ok but i need to give a variable for each no like num=345 a=3 b=4 c=5... I need for n number please give me some idea.😅
@cse-learning Жыл бұрын
Create a dynamic array and store those numbers into that array. Study malloc/calloc and you would achieve what you want.
@cartoongaming3586 Жыл бұрын
@@cse-learning thank you boss
@RAISTAR90326 Жыл бұрын
thanks brother u explained the complicated thing so easily and it is very helpful for me 💗
@marticus9170 Жыл бұрын
Thanks! Your explanation was really clear!
@tanushreemahato3223 Жыл бұрын
Thank you sir
@ranjitdas5609 Жыл бұрын
Thankyou Sir ❤❤❤
@alvegrande73982 жыл бұрын
Damn it took 30 secs for me to realize what professors explains in 3 hours... Thanks man
@cse-learning2 жыл бұрын
Thanks Alve. I am glad this helped you.
@monirul__kabir48542 жыл бұрын
Nice man...
@thelittlemathematician64232 жыл бұрын
Sir make a video on this topic: a c program for storing the digits of a number in array using function.
@s000sdas2 жыл бұрын
Thanks bro, as a uni student this came clear.
@acker.012 жыл бұрын
Thanks bro ❤️
@talhasolkar88772 жыл бұрын
Thanks
@vadlanithinnarasimha67972 жыл бұрын
Bro u said extraction of digits from a number 😓but you did reversing of number.
@cse-learning2 жыл бұрын
Bro, Its extraction of digits only in reverse order. All the numbers are printed on console together so its looks like reverse of the number but in fact it is not. Reversing is different, you can get the clarity in this video. kzbin.info/www/bejne/fXKXe4SrrcqcmLs (In Hindi).
@yokab2 жыл бұрын
Dude you rule!, thanks that was so useful!
@merlijn17222 жыл бұрын
Super useful! Thanks so much
@tiredstudent87972 жыл бұрын
how would you extract a specific digit from a number? for example if the number is 14672, I choose the 3rd digit, it extracts the number 6
@cse-learning2 жыл бұрын
This can be achieved by multiple ways and it's totally depends on how you think. One approach can be, you can start a counter and whenever a digit is extracted, increment the counter. Once counter hits 3, you can print the digit.
@SMEVlogsOLD3 жыл бұрын
Visibility thik nahi hai... camera ko white board k pass rkhna
@cse-learning3 жыл бұрын
Correct. 2020 m hi record kiya tha but publish nii kr paya tha. If I record any new videos, hope it will be of good quality.
@SMEVlogsOLD3 жыл бұрын
Bahut badhiya...
@Nursinglife-m9e3 жыл бұрын
Thank you❤❤❤❤❤
@Nursinglife-m9e3 жыл бұрын
C program make more videos
@yuvathelearner50713 жыл бұрын
ADDING ALL DIGITS AND PRINT INVIDUAL DIGITS THIS MIGHT HELP TO SME ONE #include<stdio.h> int main() { int bc[3]={7152,8976,3426},n=187,c,x,first,tp,digit,a,b,d; n=*(bc+1); printf("%d value ",n); while(n!=0) { digit=n%10; n=n/10; a=digit; printf("%d units ",a); break; } while(n!=0) { digit=n%10; n=n/10; b=digit; printf("%d tens ",b); break; } while(n!=0) { digit=n%10; n=n/10; c=digit; printf("%d hundred ",c); break; } while(n!=0) { digit=n%10; n=n/10; d=digit; printf("%d thousand ",d); break; } printf("%d",a+b+c+d); return 0; }
@LEARNINGWITHSTORIES1083 жыл бұрын
Bohat acha hai apka ye video
@zaker62573 жыл бұрын
Thanks
@xerath52243 жыл бұрын
Nice !!!
@milanjana19194 жыл бұрын
There should be a for loop and array assignment...otherwise the digit will replace the previous one
@this.saikat3 жыл бұрын
no Actually there should be a check if it's 0. because the last quotient is 0. If it's 0 so the loop will be stop. I'm not taking about for loop or array.
@WaqarAhmed-jp3mw4 жыл бұрын
bang k mean btaden
@cse-learning4 жыл бұрын
Bang??
@cse-learning4 жыл бұрын
Description me updated video ka link hai jisme maine program run krke bhi dikhaya hai.
@bludj9924 жыл бұрын
When the code runs the second time, -1.#R shows up for the total. #include <stdio.h> #include <stdlib.h> #include <conio.h> #include<string.h> #include<math.h> #include<time.h> #include<windows.h> #include<ctype.h> #define ALL 10 struct CAMP { char FName[50]; //Camper's First Name. char LName[50]; //Camper's Last Name. int Age; //Camper's Age int CampID; float Total; //The total amount the guest has to pay for the stay. int Achoice; char Active[50]; int Tchoice; int avail; int reg; char Telephone[8]; char EAdress[50]; char Adress[50]; char TOUR[50]; int Day; int Month; int Year; struct CAMP*next; }; struct CAMP*head; typedef struct CAMP CAM; typedef struct CAM CA; int menu(void); void ADDCAMP(CAM[], int); void DELCAMP(CAM[], int); void DISCAMP(CAM[], int); void SEARCHCAMP(CAM[]); char Ans; float TourCost=60.00; float ArchFees=200.00; float RoboFees=500.00; float FbFees=130.50; float SignFees=100.00; int remain; char Archery, Football, Robotics; char Address[100]; char EAddress[100]; int loop=0; int CAMPER=0; float CAMPTotal; float FOOTTotal; float ARCHTotal; float ROBOTotal; int syscount=0; int FOOTBALL; int ARCHERY; int ROBOTICS; int HARCAVE; int BDSWLDLRSRV; int PRTVLSFAC; void ADDCAMP(CAM CA[], int i) { int sea; int x; int j; char TOUR1[]="HARRISON'S CAVE"; char TOUR2[]="BARBADOS' WILDLIFE RESERVE"; char TOUR3[]="PORTVALE SUGAR FACTORY"; char TOUR4[]="NO TOUR SELECTED"; char ACT1[]="FOOTBALL"; char ACT2[]="ARCHERY"; char ACT3[]="ROBOTICS"; if (FOOTBALL<=ALL/3 && ARCHERY<=ALL/3 && ROBOTICS<=ALL/3) { if(CAMPER<ALL) { printf(" "); remain=ALL-CAMPER; CAMPER=CAMPER+1; if(CAMPER+1> ALL) { printf("This is the final camp registration slot available. "); } else { printf("There are %d registration slots left. ", remain); } CAMPER=CAMPER-1; printf(" Enter the registration slot number (The current number is %d): ",CAMPER+1); scanf("%d",&CA[sea].reg); j=CA[sea].reg; sea=j-1; printf("There is a $%.2f signup fee.",SignFees); CA[sea].Total=CA[sea].Total+SignFees; printf(" "); printf("What is the first name of the child?: "); scanf("%s",CA[sea].FName); printf(" What is the last name of the child: "); scanf("%s",CA[sea].LName); printf(" What is the child's age?: "); scanf("%d",&CA[sea].Age); if(CA[sea].Age<11) { printf(" We're sorry but the child is too young to attend Seaview Summer Camp."); printf(" "); CA[sea].Total=CA[sea].Total-SignFees; system(" pause"); } else { if(CA[sea].Age>16) { printf(" We're sorry but thr child is too old to attend Seaview Summer Camp."); printf(" "); CA[sea].Total=CA[sea].Total-SignFees; system("pause"); } else { printf(" What activity would the child like to do during the summer camp?"); printf(" "); printf("1. Football @ $%.2f ", FbFees); printf("2. Archery @ $%.2f ",ArchFees); printf("3. Robotics @ $%.2f ", RoboFees); printf("Select the number that corresponds with the choice: "); scanf("%d",&CA[sea].Achoice); if(CA[sea].Achoice==1) { for(i=0;i<=50;i++) { CA[sea].Active[i]=ACT1[i]; } CA[sea].Total=CA[sea].Total+FbFees; FOOTBALL=FOOTBALL+1; FOOTTotal=FbFees+FOOTTotal+SignFees; } if(CA[sea].Achoice==2) { CA[sea].Total=CA[sea].Total+ArchFees; for(i=0;i<=50;i++) { CA[sea].Active[i]=ACT2[i]; } ARCHERY=ARCHERY+1; ARCHTotal=ARCHTotal+ArchFees+SignFees; } if(CA[sea].Achoice==3) { CA[sea].Total=CA[sea].Total+RoboFees; for(i=0;i<=50;i++) { CA[sea].Active[i]=ACT3[i]; } ROBOTICS=ROBOTICS+1; ROBOTotal=ROBOTotal+RoboFees+SignFees; } while(CA[sea].Achoice!=1 && CA[sea].Achoice!=2 && CA[sea].Achoice!=3) { printf("NO VALID OPTION CHOSEN! PLEASE ENTER A VALID OPTION."); Sleep(1000); printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); printf("Select the number that corresponds with the choice: "); scanf("%d",&CA[sea].Achoice); if(CA[sea].Achoice==1) { for(i=0;i<=50;i++) { CA[sea].Active[i]=ACT1[i]; } CA[sea].Total=CA[sea].Total+FbFees; FOOTBALL=FOOTBALL+1; FOOTTotal=FbFees+FOOTTotal+SignFees; } if(CA[sea].Achoice==2) { CA[sea].Total=CA[sea].Total+ArchFees; for(i=0;i<=50;i++) { CA[sea].Active[i]=ACT2[i]; } ARCHERY=ARCHERY+1; ARCHTotal=ARCHTotal+ArchFees+SignFees; } if(CA[sea].Achoice==3) { CA[sea].Total=CA[sea].Total+RoboFees; for(i=0;i<=50;i++) { CA[sea].Active[i]=ACT3[i]; } ROBOTICS=ROBOTICS+1; ROBOTotal=ROBOTotal+RoboFees+SignFees; } } printf(" "); printf("Which of the following $60 tours would the child like to attend?: "); printf("1. Harrison's Cave 2. Barbados' Wildlife Reserve 3. PortVale Sugar Factory 4. The camper does not wish to go on any of the tours."); printf(" Select the number that corresponds with the choice: "); scanf("%d",&CA[sea].Tchoice); if(CA[sea].Tchoice==1) { CA[sea].Total=CA[sea].Total+TourCost; for (i=0;i<=50;i++) { CA[sea].TOUR[i]=TOUR1[i]; } HARCAVE=HARCAVE+1; } if(CA[sea].Tchoice==2) { CA[sea].Total=CA[sea].Total+TourCost; for (i=0;i<=50;i++) { CA[sea].TOUR[i]=TOUR2[i]; } BDSWLDLRSRV=BDSWLDLRSRV+1; } if(CA[sea].Tchoice==3) { CA[sea].Total=CA[sea].Total+TourCost; for (i=0;i<=50;i++) { CA[sea].TOUR[i]=TOUR3[i]; } PRTVLSFAC=PRTVLSFAC+1; } if(CA[sea].Tchoice!=1 && CA[sea].Tchoice!=2 && CA[sea].Tchoice!=3) { for (i=0;i<=50;i++) { CA[sea].TOUR[i]=TOUR4[i]; } } printf(" Contact number (Please include a '-'): (+1 246) "); scanf("%s",CA[sea].Telephone); printf(" Enter an email address: "); scanf("%s",CA[sea].EAdress); printf(" Please enter your address: "); fflush(stdin); gets(CA[sea].Adress); printf(" Your total is $%.2f ",CA[sea].Total); CA[sea].CampID = rand(); system("pause"); system("cls"); printf(" "); printf("==================================CAMPER ADDED SUCCESSFULLY======================================= "); printf(" \t\t\t\t\tCAMP ID: %d " "\t\t\t\t\tNAME: %s %s " "\t\t\t\t\tCHOSEN ACTIVITY: %s " "\t\t\t\t\tCHOSEN TOUR: %s " "\t\t\t\t\tTELEPHONE NUMBER: %s " "\t\t\t\t\tEMAIL ADDRESS: %s " "\t\t\t\t\tADRESS: %s " "\t\t\t\t\tTOTAL FEES: $%.2f ", CA[sea].CampID, CA[sea].FName, CA[sea].LName, CA[sea].Active, CA[sea].TOUR, CA[sea].Telephone, CA[sea].EAdress, CA[sea].Adress, CA[sea].Total); printf("==================================CAMPER ADDED SUCCESSFULLY======================================= "); CA[sea].avail=1; CAMPER=CAMPER+1; CAMPTotal=CAMPTotal+CA[sea].Total; system(" pause"); } } } else { printf("All available camp registration slots are filled."); system(" pause"); } } else { printf("All available camp registration slots are filled."); system(" pause"); } } int main(void) { head=NULL; srand(time(NULL)); system ("color 09"); CAM CA[ALL]; int option; while ((option = menu()) != 5) { switch (option) { case 1: system("cls"); printf(" ADDING A NEW CAMPER'S INFORMATION INTO THE SYSTEM: "); ADDCAMP(CA, CAMPER); break; case 2: system("cls"); printf(" DELETING A CAMPER'S INFORMATION FROM THE SYSTEM: "); DELCAMP(CA, CAMPER); break; case 3: system("cls"); printf(" DISPLAYING THE INFORMATION FOR (ALL) CAMPERS IN THE SYSTEM: "); DISCAMP(CA, CAMPER); break; case 4: system("cls"); printf(" SEARCHING CAMPER FILE FOR A CAMPER: "); SEARCHCAMP(CA); break; default: printf("!!PLEASE ENTER A NUMBER THAT CORRESPONDS WITH THE GIVEN ACTIONS DISPLAYED IN THE MENU!! "); system(" pause"); break; }// end switch }//end while loop return 0; }//end if statement
@bludj9924 жыл бұрын
int menu() //THE MENU CHOICES FOR THE PROGRAM { int choice; int move; system("cls"); if(syscount<1) { printf("!!ATTENTION: PLEASE DO NOT TURN OFF THE SYSTEM! THIS WILL RESULT IN A COMPLETE WIPE OF ALL CAMPER INFORMATION FROM THE SYSTEM!! "); syscount=syscount+1; } printf("maintenance contact number:(+1 246) 847-3012 maintenance email address: [email protected] %d ",syscount); printf("===============================WELCOME TO SEAVIEW SUMMER CAMP'S REGISTRATION SYSTEM=============================== " " PLEASE ENTER THE NUMBER THAT CORRESPONDS WITH YOUR CHOICE "); printf("\t\t\t\t1. ADD A CAMPER's REGISTRATION DATA TO THE SYSTEM "); printf("\t\t\t\t2. DELETE A CAMPER's REGISTRATION DATA FROM THE SYSTEM this is not currently available "); printf("\t\t\t\t3. DISPLAY (ALL) THE CAMPERS IN THE SYSTEM "); printf("\t\t\t\t4. SEARCH CAMPER DIRECTORY FOR A CAMPER "); printf("\t\t\t\t5. !!EXIT!! "); printf("=================================================================================================================="); printf(" Enter your choice: "); scanf("%d",&choice); syscount=syscount+1; return choice; }
@cse-learning4 жыл бұрын
@@bludj992 if(are you testing me?) { consider me as FAILED. } else { you have done a tremendous job. By looking into the code, It seems you have created camping registration system. if you are not getting expected result, then its a logical error and only you can fix this or someone who knows the requirement. I can only suggest you to,Dry run the code, it will help you understand where you are making a mistake. }
@bludj9924 жыл бұрын
@@cse-learning Ok. Thank you. Edit: Can the length of the code be causing the problem? The full code with all of the functions is over 1100 lines and I'm using Dev C/C++ compiler. Is there a better compiler that may be able to handle the length of the code if that is the problem?
@cse-learning4 жыл бұрын
No length of the lines won't cause any problem. Dev c compiler is good option. You can check codeblock as an alternative.
@bludj9924 жыл бұрын
@@cse-learning I can't use codeblocks properly. I used it when I first started C but now, I only use Dev. It just works better in my opinion. As for the problem, I still don't know what caused it but putting an if statement that resets the total to 0.00 if CAMPER+1==2 seems to work. I don't know why. To me, it doesn't make sense but I'm not getting the error anymore. I just decided to set the total as 0.00 every time the function runs (instead of only if a requirement is met (the program is intended for 90 people. I can't test all 90 spaces and put an if statement for all the ones that don't work properly)) and that seems to solve the problem. Thanks again for your help.
@bludj9924 жыл бұрын
Hi. I'm having some trouble with totalling in my program. What does -1.#R mean?
@cse-learning4 жыл бұрын
Hi Blu Dj, can you please explain your question in detail. if possible, share your code.
@bludj9924 жыл бұрын
@@cse-learning My code is in the next comment.
@manishshah24246 жыл бұрын
#include<stdio.h> int main() { int n,i,rem; printf("Enter any number: "); scanf("%d",&n); for(i=0;i<=n;i++) { rem=n%10; n=n/10; printf("%d ",rem); } return 0; } //isme 123 enter karne se 1 kyu nahi dikha raha hei?
@cse-learning4 жыл бұрын
logic thoda sahi nahi hai. fir bhi isko modify kr skte hai: for(i=0;i<=n;i++) ko for(;n>0;) se replace kr dene se ye program sahi output dega.