PROGRAMMING WORLD
Home
C
C++
JAVA
Swift
ASP.NET
NETWORK
MATLAB
GATE
DOWNLOAD
Check the given number is perfect number or not in swift 3.0
19:50:00
DOWNLOAD
,
Swift
No comments
Code:
import
UIKit
var
n =
28
var
temp =
n
var
sum =
0
for
i
in
1
...
n
-
1
{
if
(
n
%i==
0
)
{
sum
=
sum
+ i
}
}
if
(
sum
==
temp
)
{
print
(
"
\
(
temp
) is perfect number."
)
}
else
{
print
(
"
\
(
temp
) is not perfect number."
)
}
Result:
Read More
Find Factors of given number in swift 3.0
22:25:00
DOWNLOAD
,
Swift
No comments
Code:
import
UIKit
var
n =
12
print
(
"Factors of
\
(
n
) are:\n"
)
for
i
in
1
...
n
{
if
(
n
%i==
0
)
{
print
(
"
\
(
i
) "
)
}
}
Result:
Read More
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Social Profiles
Popular
Tags
Blog Archives
Blogger templates
Configure an Adhoc network using Network Simulator Tool Packet Tracer
You can Configure an Adhoc network using Network Simulator Tool Packet Tracer as given in file. You can follow the step by step configurati...
Pass value from one scene to other in iOS app using Swift
Code of ViewController (code of file from where you want to pass value): import UIKit class ViewController: UIViewController { ...
MATLAB CODE TO DESIGN A CHEBYSHEV I BANDPASS FILTER
CODE: clear all alphap=2; %passband attenuation in dB alphas=20; %stopband attenuation in dB wp=[.2*pi,.4*pi]; % passband fr...
Generate the Complex exponential sequence with MATLAB
Code: clc; clear all; a=input('Type in real exponent : '); b=input('Type in complex exponent : '); c=a+b*i; k...
MATLAB CODE TO VERIFY TIME SHIFTING PROPERTY OF DFT
CODE: close all; x=input('Enter the input sequence'); n=input('Enter the delay integer'); x1=length(x); xn=x1+n; ...
Syllabus for Computer Science and Information Technology (CS) for GATE 2015
Syllabus for Computer Science and Information Technology (CS) General Aptitude (GA): Common to All Papers 1. Verbal Ability: English...
Write a program in swift to check the number is even or odd.
Code: import UIKit var n = 28 // enter your number here if(n%2==0) { print("\(n) is even number.") } ...
Write a MATLAB code to perform the contrast stretching on the image. Show the original and stretched image along with their histograms.
CODE: clear all ; close all ; clc; %% Reading an image a=imread( 'cameraman.tif' ); a=double(a); s=size(a); ...
MATLAB CODE TO DESIGN A BUTTERWORTH BANDPASS FILTER
CODE: clear all alphap=2; %passband attenuation in dB alphas=20; %stopband attenuation in dB wp=[.2*pi,.4*pi]; % passband freq. in...
Matlab code to verify the adaptive delta modulation
Code: clc clear all; t =0:1/29:1; f=1; x=4*sin(2*pi*f*t); x=[x ones(1,10) x]; y = zeros(1,length(x));...
Categories
C
(10)
C++
(7)
DOWNLOAD
(99)
GATE
(6)
iOS app
(1)
JAVA
(1)
MATLAB
(51)
NETWORK
(16)
pass value
(1)
Swift
(8)
swift 4.0
(1)
swift app
(1)
Search This Blog
Blog Archive
▼
2018
(1)
▼
September
(1)
Pass value from one scene to other in iOS app usi...
►
2017
(3)
►
May
(3)
►
2016
(5)
►
December
(4)
►
November
(1)
►
2014
(91)
►
October
(16)
►
September
(24)
►
August
(49)
►
February
(2)