Write a C program to print the pyramid of digits in pattern

Write a C program to print the pyramid of digits in pattern. #include <stdio.h> main() { int i,s,r,k=0,count,count1; count=0; count1=0; printf(“Enter the number of rows: “); scanf(“%d”,&r); for(i=1;i<=rows;++i)   /*loop for rows*/ { for(s=1;s<=r-i;s++) /* loop for space*/ { printf(” “); count++; } while(k!=2*i-1) { if (count<=r-1) { printf(“%d “,(i+k)); count++; } else { count1++; printf(“%d […] Continue reading →

Write a program in Java to accept a number and check wheather it is an automorphic or not.use the function name as digits(int n) that returns the last digit(s)present in the number.

An Automorphic number is the number that is contained in the last digit(s) of its square.write a program in java to accept a number and check whether it is an Automorphic or not.use the function name as digits(int n) that returns the last digit(s)present in the number. e.g is an Automorphic number.the square of 25 […] Continue reading →

Write a program to Draw Rectangle Dots at Random Locations in an Applet

/*   Write a program to Draw Rectangle Dots at Random Locations in an Applet This Java example shows draw dots at random locations at specified interval using Java Thread and Applet classes. */ import java.applet.Applet; import java.awt.*; import java.awt.Dimension; import java.awt.Graphics; public class doot extends Applet implements Runnable{ Thread t; public void init(){ //start new […] Continue reading →

Fundamental Computer Questions and Answers (Set-6)

Fundamental Computer Questions and Answers Set- 6 A pixel is ……………. Ans. The smallest resolvable part of a picture When a key is pressed on the keyboard, which standard is used for converting the keystroke into the corresponding bits: Ans. ASCII Which technology is used in Compact disks? Ans. Laser Which number system is usually […] Continue reading →
Page 1 of 40123456»102030...Last »