Make coding your habit. Learn coding with us and make it your passion. Many programs, different languages, ask questions, have your answer and learn easily how to code in each language.
Find Days and Months
Get link
Facebook
X
Pinterest
Email
Other Apps
-
C program to find the number of days and months on the basis of given input
In this post, I shared a C program to find the total number of months and the remaining days on the basis of the given input from the user.
#include <stdio.h>
#include <conio.h>
void main()
{
int day,month,day1;
printf("enter the number of days:\n");
scanf("%d",&day);
month=day/30;
day1=day%30;
printf(“month is =%d”,month);
printf(:days are =%d,day1);
getch();
}
Easiest Way to Implement Multi Selection of Item in Recycler View Hello friends, in this blog post I am going to show you that how one can make a multi selection functionality for items in the Recycler View So lets get started. First add the following dependencies to your project: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' //Recycler View Dependency implementation 'androidx.recyclerview:recyclerview-selection:1.0.0' } Now in this project we have two XML layout file: For Main...
Hello friends, in this tutorial we will learn how to upload an image from android to php server. Lets go for it. Prerequisites: Android Studio Xampp or Wamp Server (I am using Xampp here) Text Editor (I recommend to use Sublime) Structure of the Database: Firstly, we use our Android Studio to make our front part ready to capture the photo and get it ready to upload on the server. To get start with the actual code add the permissions and dependencies to make the project work properly. Add below permissions in the Manifests file. <uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission> And add the volley dependency in the build.gradle file of the App Module. implementation 'com.android.volley:volley:1.1.1' So, initially we make our layout for the Main Activity. Here is the layout co...
Merge Sort in C In computer science , merge sort (also commonly spelled mergesort ) is an efficient, general-purpose, comparison-based sorting algorithm . Most implementations produce a stable sort , which means that the implementation preserves the input order of equal elements in the sorted output. Mergesort is a divide and conquer algorithm that was invented by John von Neumann in 1945. Algorithm Conceptually, a merge sort works as follows: Divide the unsorted list into n sublists, each containing 1 element (a list of 1 element is considered sorted). Repeatedly merge sublists to produce new sorted sublists until there is only 1 sublist remaining. This will be the sorted list.
Comments
Post a Comment