Category: Programming Problem Solving
Another easy understandable tut is in this link: http://zakilive.com/2017/05/12/check-the-number-is-prime-or-not-in-c-easy-and-details-explanation/ Code: #include<stdio.h> int main() { int i,flag,N; flag=0; printf(“eNter…
Reference: https://www.daniweb.com/programming/software-development/threads/201233/use-of-flag-in-c
Swap in C #include<stdio.h> int main() { int x,y,z; x=5; y=7; printf(“Before x=%d y=%d\n”,x,y); z=x; x=y; y=z;…
Here yo can see what is triangular number: https://en.wikipedia.org/wiki/Triangular_number public class NumShape { public static void main(String[]…
#include<iostream> #include<cstdio> using namespace std; int main() { int testcase,star,i,j,k; cin>>testcase; for(i=0; i<testcase; i++) { cin>>star; for(j=0;…
Solution: #include<iostream> #include<cstdio> using namespace std; int main() { int testcase,i,num_range,j; cin>>testcase; for(i=1; i<=testcase; i++) { cin>>num_range;…
Recent Comments